diff --git a/client/galaxy/scripts/mvc/tool/tools.js b/client/galaxy/scripts/mvc/tool/tools.js
index 57b7a9b39e5f..710b0230ec20 100644
--- a/client/galaxy/scripts/mvc/tool/tools.js
+++ b/client/galaxy/scripts/mvc/tool/tools.js
@@ -521,6 +521,7 @@ var ToolLinkView = BaseView.extend({
var $link = $('
").attr("id","loading_indicator"),this.$el.append(this.loading_indicator);var t=r("").attr({id:"content_table",cellpadding:0});this.$el.append(t);var e=this.model.get_metadata("column_names"),i=r(" ").appendTo(t),n=r(" ").appendTo(i);if(e)n.append(""+e.join(" ")+" ");else for(var s=1;s<=this.model.get_metadata("columns");s++)n.append(""+s+" ");var o=this,a=this.model.get("first_data_chunk");a?this._renderChunk(a):r.when(o.model.get_next_chunk()).then(function(t){o._renderChunk(t)}),this.scroll_elt.scroll(function(){o.attempt_to_fetch()})},scrolled_to_bottom:function(){return!1},_renderCell:function(t,e,i){var n=r("").text(t),s=this.model.get_metadata("column_types");return void 0!==i?n.attr("colspan",i).addClass("stringalign"):s&&e"),n=this.model.get_metadata("columns");return this.row_count%2!==0&&i.addClass("dark_row"),e.length===n?a.each(e,function(t,e){i.append(this._renderCell(t,e))},this):e.length>n?(a.each(e.slice(0,n-1),function(t,e){i.append(this._renderCell(t,e))},this),i.append(this._renderCell(e.slice(n-1).join(" "),n-1))):n>5&&e.length===n-1?(a.each(e,function(t,e){i.append(this._renderCell(t,e))},this),i.append(r(""))):i.append(this._renderCell(t,0,n)),this.row_count++,i},_renderChunk:function(t){var e=this.$el.find("table");a.each(t.ck_data.split("\n"),function(t,i){""!==t&&e.append(this._renderRow(t))},this)}}),h=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),scroll_elt=a.find(this.$el.parents(),function(t){return"auto"===r(t).css("overflow")}),scroll_elt||(scroll_elt=window),this.scroll_elt=r(scroll_elt)},scrolled_to_bottom:function(){return this.$el.height()-this.scroll_elt.scrollTop()-this.scroll_elt.height()<=0}}),u=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),this.scroll_elt=this.$el.css({position:"relative",overflow:"scroll",height:t.height||"500px"})},scrolled_to_bottom:function(){return this.$el.scrollTop()+this.$el.innerHeight()>=this.el.scrollHeight}}),p=o.View.extend({col:{chrom:null,start:null,end:null},url_viz:null,dataset_id:null,genome_build:null,file_ext:null,initialize:function(t){function e(t,e){for(var i=0;i';return t.icon&&(e+=' '),e+=''+t.title+" "}}),i=e.extend({initialize:function(t){e.prototype.initialize.call(this,t)},_template:function(t){return' '}}),n=o.View.extend({initialize:function(e){this.options=t.merge(e,{title:"Select/Unselect all",icons:["fa fa-square-o","fa fa-minus-square-o","fa fa-check-square-o"],value:0}),this.setElement(this._template()),this.$title=this.$(".title"),this.$icon=this.$(".icon"),this.value(this.options.value),this.$title.html(this.options.title);var i=this;this.$el.on("click",function(){i.current=0===i.current&&2||0,i.value(i.current),i.options.onclick&&i.options.onclick()})},value:function(t,e){return void 0!==t&&(e&&0!==t&&(t=t!==e&&1||2),this.current=t,this.$icon.removeClass().addClass("icon").addClass(this.options.icons[t]),this.options.onchange&&this.options.onchange(t)),this.current},_template:function(){return'
'}}),s=o.View.extend({initialize:function(e){this.options=t.merge(e,{id:t.uid(),title:"",floating:"right",cls:"ui-button-icon",icon:"",tooltip:"",onclick:null}),this.setElement(this._template(this.options)),this.$button=this.$el.find(".button");var i=this;a(this.el).on("click",function(){a(".tooltip").hide(),e.onclick&&!i.disabled&&e.onclick()}),this.$button.tooltip({title:e.tooltip,placement:"bottom"})},disable:function(){this.$button.addClass("disabled"),this.disabled=!0},enable:function(){this.$button.removeClass("disabled"),this.disabled=!1},setIcon:function(t){this.$("i").removeClass(this.options.icon).addClass(t),this.options.icon=t},_template:function(t){var e="";t.title&&(e="width: auto;");var i='';return i+=t.title?' '+t.title+" ":' ',i+="
"}}),r=o.View.extend({$menu:null,initialize:function(e){this.options=t.merge(e,{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:""}),this.setElement(a(this._template(this.options)));var i=a(this.el).find(".root"),n=this;i.on("click",function(t){a(".tooltip").hide(),t.preventDefault(),n.options.onclick&&n.options.onclick()}),this.options.visible||this.hide(),i.tooltip({title:e.tooltip,placement:"bottom"})},show:function(){a(this.el).show()},hide:function(){a(this.el).hide()},addMenu:function(e){var i={title:"",target:"",href:"",onclick:null,divider:!1,icon:null,cls:"button-menu btn-group"};i=t.merge(e,i),this.$menu||(a(this.el).append(this._templateMenu()),this.$menu=a(this.el).find(".menu"));var n=a(this._templateMenuItem(i));n.on("click",function(t){i.onclick&&(t.preventDefault(),i.onclick())}),this.$menu.append(n),i.divider&&this.$menu.append(a(this._templateDivider()))},_templateMenuItem:function(t){var e='",t.icon&&(e+=' '),e+=" "+t.title+" "},_templateMenu:function(){return''},_templateDivider:function(){return' '},_template:function(t){var e="",i="";t.title?e="width: auto;":i="margin: 0px;";var n=' ';return t.title&&(n+=' '+t.title+" "),n+="
"}});return{ButtonDefault:e,ButtonLink:i,ButtonIcon:s,ButtonCheck:n,ButtonMenu:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){var e=o.View.extend({row:null,row_count:0,optionsDefault:{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",cls_tr:""},events:{click:"_onclick",dblclick:"_ondblclick"},initialize:function(e){this.options=t.merge(e,this.optionsDefault);var i=a(this._template(this.options));this.$thead=i.find("thead"),this.$tbody=i.find("tbody"),this.$tmessage=i.find("tmessage"),this.setElement(i),this.row=this._row()},addHeader:function(t){var e=a(" ");e.append(t),this.row.append(e)},appendHeader:function(){this.$thead.append(this.row),this.row=a(" ")},add:function(t,e,i){var n=a(" ");e&&n.css("width",e),i&&n.css("text-align",i),n.append(t),this.row.append(n)},append:function(t,e){this._commit(t,e,!1)},prepend:function(t,e){this._commit(t,e,!0)},get:function(t){return this.$el.find("#"+t)},del:function(t){var e=this.$tbody.find("#"+t);e.length>0&&(e.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(t){this.before=this.$tbody.find(".current").attr("id"),void 0!==t&&(this.$tbody.find("tr").removeClass("current"),t&&this.$tbody.find("#"+t).addClass("current"));var e=this.$tbody.find(".current").attr("id");return void 0===e?null:(e!=this.before&&this.options.onchange&&this.options.onchange(t),e)},size:function(){return this.$tbody.find("tr").length},_commit:function(t,e,i){this.del(t),this.row.attr("id",t),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),e&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return a(' ')},_onclick:function(t){var e=this.value(),i=a(t.target).closest("tr").attr("id");""!=i&&i&&e!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(t){var e=this.value();e&&this.options.ondblclick&&this.options.ondblclick(e)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(t){return''+t.content+" "}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(i,o,a){n=[],s=function(){var t=i.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:!0,id:null,href:null,target:null,enabled:!0,visible:!0,tooltip_config:{}}}),e=i.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"},this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var t=this.template(this.model.toJSON());return t.tooltip(this.model.get("tooltip_config")),this.$el.replaceWith(t),this.setElement(t),this},events:{click:"click"},click:function(t){return o.isFunction(this.model.get("on_click"))?(this.model.get("on_click")(t),!1):!0},template:function(t){var e='title="'+t.title+'" class="icon-button';return t.is_menu_button&&(e+=" menu-button"),e+=" "+t.icon_class,t.enabled||(e+="_disabled"),e+='"',t.id&&(e+=' id="'+t.id+'"'),e+=' href="'+t.href+'"',t.target&&(e+=' target="'+t.target+'"'),t.visible||(e+=' style="display: none;"'),e=t.enabled?"
":"
",a(e)}}),n=i.Collection.extend({model:t}),s=i.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var t=this;return this.collection.each(function(e){var i=a("
").attr("href","javascript:void(0)").attr("title",e.attributes.title).addClass("icon-button menu-button").addClass(e.attributes.icon_class).appendTo(t.$el).click(e.attributes.on_click);e.attributes.tooltip_config&&i.tooltip(e.attributes.tooltip_config);var n=e.get("options");n&&make_popupmenu(i,n)}),this}}),r=function(e,i){i||(i={});var a=new n(o.map(e,function(e){return new t(o.extend(e,i))}));return new s({collection:a})};return{IconButton:t,IconButtonView:e,IconButtonCollection:n,IconButtonMenuView:s,create_icon_buttons_menu:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s,o;!function(a){s=[i(1)],n=a,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(t){"use_strict";var e=t;e.fn.make_text_editable=function(t){var i="num_cols"in t?t.num_cols:30,n="num_rows"in t?t.num_rows:4,s="use_textarea"in t?t.use_textarea:!1,o="on_finish"in t?t.on_finish:null,a="help_text"in t?t.help_text:null,r=e(this);return r.addClass("editable-text").click(function(a){if(!(e(this).children(":input").length>0)){r.removeClass("editable-text");var l,c,d=function(t){r.find(":input").remove(),""!==t?r.text(t):r.html("
"),r.addClass("editable-text"),o&&o(t)},h="cur_text"in t?t.cur_text:r.text();s?(l=e("
").attr({rows:n,cols:i}).text(e.trim(h)).keyup(function(t){27===t.keyCode&&d(h)}),c=e("
").text("Done").click(function(){return d(l.val()),!1})):l=e("
").attr({value:e.trim(h),size:i}).blur(function(){d(h)}).keyup(function(t){27===t.keyCode?e(this).trigger("blur"):13===t.keyCode&&d(e(this).val()),t.stopPropagation()}),r.text(""),r.append(l),c&&r.append(c),l.focus(),l.select(),a.stopPropagation()}}),a&&r.attr("title",a).tooltip(),r}})},function(t,e,i){var n;(function(s,o){n=function(){function t(t){t+="";for(var e=/(\d+)(\d{3})/;e.test(t);)t=t.replace(e,"$1,$2");return t}var e=function(t){return"promise"in t},i=s.Model.extend({defaults:{ajax_settings:{},interval:1e3,success_fn:function(t){return!0}},go:function(){var t=o.Deferred(),e=this,i=e.get("ajax_settings"),n=e.get("success_fn"),s=e.get("interval"),a=function(){o.ajax(i).success(function(e){n(e)?t.resolve(e):setTimeout(a,s)})};return a(),t}}),n=function(t){t||(t="#ffffff"),"string"==typeof t&&(t=[t]);for(var e=0;e
>16,s=(65280&i)>>8,o=255&i,d=p(n,s,o),f=!0,e=0;e>16,l=(65280&a)>>8,c=255&a,h=p(r,l,c),u=g(n,s,o,r,l,c),Math.abs(d-h)<40||200>u){f=!1;break}m++}while(!f&&10>=m);return"#"+(16777216+i).toString(16).substr(1,6)};return{commatize:t,is_deferred:e,ServerStateDeferred:i,get_random_color:n}}.call(e,i,e,t),!(void 0!==n&&(t.exports=n))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(27),i(6),i(5)],s=function(t,e,i){t=t||window.BibtexParser;var n="citation",s=o.Model.extend(e.LoggableMixin).extend({_logNamespace:n,defaults:{content:""},initialize:function(){var e;try{e=t(this.attributes.content)}catch(i){return}if(e.errors.length){var n=e.errors.reduce(function(t,e){return t+"; "+e});this.log("Error parsing bibtex: "+n)}if(this._fields={},this.entry=a.first(e.entries),this.entry){var s=this.entry.Fields;for(var o in s){var r=s[o],l=o.toLowerCase();this._fields[l]=r}}},entryType:function(){return this.entry?this.entry.EntryType:void 0},fields:function(){return this._fields}}),r=o.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,urlRoot:Galaxy.root+"api",partial:!0,model:s}),l=r.extend({url:function(){return this.urlRoot+"/histories/"+this.history_id+"/citations"}}),c=r.extend({url:function(){return this.urlRoot+"/tools/"+this.tool_id+"/citations"},partial:!1});return{Citation:s,HistoryCitationCollection:l,ToolCitationCollection:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(4),i(7),i(43)],s=function(t,e,i){var n=i.extend({initialize:function(n){var s=this;i.prototype.initialize.call(this,t.merge({customize:function(t){t.buttons={execute:execute_btn=new e.Button({icon:"fa-check",tooltip:"Execute: "+t.name+" ("+t.version+")",title:"Execute",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){execute_btn.wait(),s.portlet.disable(),s.submit(t,function(){execute_btn.unwait(),s.portlet.enable()})}})},t.job_id&&t.job_remap&&(t.inputs.rerun_remap_job_id={label:"Resume dependencies from this job",name:"rerun_remap_job_id",type:"select",display:"radio",ignore:"__ignore__",value:"__ignore__",options:[["Yes",t.job_id],["No","__ignore__"]],help:"The previous run of this tool failed and other tools were waiting for it to finish successfully. Use this option to resume those tools using the new output(s) of this tool run."})}},n))},submit:function(e,i){var n=this,s={tool_id:e.id,tool_version:e.version,inputs:this.data.create()};if(this.trigger("reset"),!n.validate(s))return Galaxy.emit.debug("tool-form::submit()","Submission canceled. Validation failed."),void(i&&i());if(e.action!==Galaxy.root+"tool_runner/index"){var r=o("").attr({action:e.action,method:e.method,enctype:e.enctype});return a.each(s.inputs,function(t,e){r.append(o(" ").attr({name:e,value:t}))}),r.hide().appendTo("body").submit().remove(),void(i&&i())}Galaxy.emit.debug("tool-form::submit()","Validation complete.",s),t.request({type:"POST",url:Galaxy.root+"api/tools",data:s,success:function(t){i&&i(),n.$el.empty().append(n._templateSuccess(t)),parent.Galaxy&&parent.Galaxy.currHistoryPanel&&parent.Galaxy.currHistoryPanel.refreshContents();
-},error:function(t){if(i&&i(),Galaxy.emit.debug("tool-form::submit","Submission failed.",t),t&&t.err_data){var e=n.data.matchResponse(t.err_data);for(var o in e){n.highlight(o,e[o]);break}}else{var a=parent.Galaxy.modal;a&&a.show({title:"Job submission failed",body:t&&t.err_msg||n._templateError(s),buttons:{Close:function(){a.hide()}}})}}})},validate:function(t){var e=t.inputs,i=-1,n=null;for(var s in e){var o=e[s],a=this.data.match(s),r=this.field_list[a],l=this.input_list[a];if(a&&l&&r){if(!l.optional&&null==o)return this.highlight(a),!1;if(o&&o.batch){var c=o.values.length,d=c>0&&o.values[0]&&o.values[0].src;if(d)if(null===n)n=d;else if(n!==d)return this.highlight(a,"Please select either dataset or dataset list fields for all batch mode fields."),!1;if(-1===i)i=c;else if(i!==c)return this.highlight(a,"Please make sure that you select the same number of inputs for all batch mode fields. This field contains "+c+" selection(s) while a previous field contains "+i+" ."),!1}}else Galaxy.emit.debug("tool-form::validate()","Retrieving input objects failed.")}return!0},_templateSuccess:function(t){if(t.jobs&&t.jobs.length>0){var e=t.jobs.length,i=1==e?"1 job has":e+" jobs have",n=o("
").addClass("donemessagelarge").append(o("
").text(i+" been successfully added to the queue - resulting in the following datasets:"));return a.each(t.outputs,function(t){n.append(o("
").addClass("messagerow").append(o(" ").text(t.hid+": "+t.name)))}),n.append(o("
").append(" ").text("You can check the status of queued jobs and view the resulting data by refreshing the History pane. When the job has been run the status will change from 'running' to 'finished' if completed successfully or 'error' if problems were encountered.")),n}return this._templateError(t)},_templateError:function(t){return o("
").addClass("errormessagelarge").append(o("
").text("The server could not complete the request. Please contact the Galaxy Team if this error persists.")).append(o(" ").text(JSON.stringify(t,null,4)))}});return{View:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(4),i(9),i(7)],s=function(t,e,i){var n=o.View.extend({initialize:function(t){var n=this;this.options=t,this.name=t.name||"element",this.multiple=t.multiple||!1,this.message=new i.Message,this.portlet=new e.View({cls:"ui-portlet-section"}),this.select=new i.Select.View({optional:t.optional}),this.button=new i.ButtonIcon({icon:"fa fa-sign-in",floating:"left",tooltip:"Insert new "+this.name,onclick:function(){n.add({id:n.select.value(),name:n.select.text()})}}),this.setElement(this._template(t)),this.$(".ui-list-message").append(this.message.$el),this.$(".ui-list-portlet").append(this.portlet.$el),this.$(".ui-list-button").append(this.button.$el),this.$(".ui-list-select").append(this.select.$el)},value:function(t){if(void 0!==t){if(this.portlet.empty(),a.isArray(t))for(var e in t){var i=t[e],n=null,s=null;"string"!=a.type(i)?(n=i.id,s=i.name):n=s=i,null!=n&&this.add({id:n,name:s})}this._refresh()}var o=[];return this.$(".ui-list-id").each(function(){o.push({id:a(this).prop("id"),name:a(this).find(".ui-list-name").html()})}),0==o.length?null:o},add:function(e){var i=this;if(0===this.$('[id="'+e.id+'"]').length)if(t.isEmpty(e.id))this.message.update({message:"Please select a valid "+this.name+".",status:"danger"});else{var n=a(this._templateRow({id:e.id,name:e.name}));n.on("click",function(){n.remove(),i._refresh()}),n.on("mouseover",function(){n.addClass("portlet-highlight")}),n.on("mouseout",function(){n.removeClass("portlet-highlight")}),this.portlet.append(n),this._refresh()}else this.message.update({message:"This "+this.name+" is already in the list."})},update:function(t){this.select.update(t)},_refresh:function(){this.$(".ui-list-id").length>0?(!this.multiple&&this.button.disable(),this.$(".ui-list-portlet").show()):(this.button.enable(),this.$(".ui-list-portlet").hide()),this.options.onchange&&this.options.onchange()},_template:function(t){return''},_templateRow:function(t){return''+t.name+"
"}});return{View:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(13)],s=function(t,e){var i=o.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new o.Model({visible:!0,data:[],id:t.uid(),error_text:"No options available.",wait_text:"Please wait...",multiple:!1,optional:!1,onchange:function(){}}).set(e),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:visible",this._changeVisible,this),this.on("change",function(){i.model.get("onchange")(i.value())}),this.render()},render:function(){var t=this;this.$el.empty().removeClass().addClass("ui-options").append(this.$message=a("
")).append(this.$menu=a("
").addClass("ui-options-menu")).append(this.$options=a(this._template())),this.all_button=null,this.model.get("multiple")&&(this.all_button=new e.ButtonCheck({onclick:function(){t.$("input").prop("checked",0!==t.all_button.value()),t.value(t._getValue()),t.trigger("change")}}),this.$menu.append(this.all_button.$el)),this._changeData(),this._changeWait(),this._changeVisible()},_changeData:function(){var t=this;this.$options.empty(),this._templateOptions?this.$options.append(this._templateOptions(this.model.get("data"))):r.each(this.model.get("data"),function(e){t.$options.append(a(t._templateOption(e)).addClass("ui-option").tooltip({title:e.tooltip,placement:"bottom"}))});var t=this;this.$("input").on("change",function(){t.value(t._getValue()),t.trigger("change")}),this._changeValue(),this._changeWait()},_changeVisible:function(){this.$el[this.model.get("visible")?"show":"hide"]()},_changeWait:function(){this.model.get("wait")?0===this.length()&&(this._messageShow(this.model.get("wait_text"),"info"),this.$options.hide(),this.$menu.hide()):0===this.length()?(this._messageShow(this.model.get("error_text"),"danger"),this.$options.hide(),this.$menu.hide()):(this.$message.hide(),this.$options.css("display","inline-block"),this.$menu.show())},_changeValue:function(){this._setValue(this.model.get("value")),null!==this._getValue()||this.model.get("multiple")||this.model.get("optional")||this._setValue(this.first()),this.all_button&&this.all_button.value(a.isArray(this._getValue())?this._getValue().length:0,this.length())},value:function(t){return void 0!==t&&this.model.set("value",t),this._getValue()},first:function(){var t=this.$("input").first();return t.length>0?t.val():null},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},length:function(){return this.$(".ui-option").length},_setValue:function(t){var e=this;if(void 0!==t&&(this.$("input").prop("checked",!1),null!==t)){var i=a.isArray(t)?t:[t];r.each(i,function(t){e.$('input[value="'+t+'"]').first().prop("checked",!0)})}},_getValue:function(){var e=[];return this.$(":checked").each(function(){e.push(a(this).val())}),t.isEmpty(e)?null:this.model.get("multiple")?e:e[0]},_messageShow:function(t,e){this.$message.show().removeClass().addClass("ui-message alert alert-"+e).html(t)},_template:function(){return a("
").addClass("ui-options-list")}}),n=i.extend({_templateOption:function(e){var i=t.uid();return a("
").addClass("ui-option").append(a(" ").attr({id:i,type:this.model.get("type"),name:this.model.id,value:e.value})).append(a(" ").addClass("ui-options-label").attr("for",i).html(e.label))}}),s={};s.View=n.extend({initialize:function(t){t.type="radio",n.prototype.initialize.call(this,t)}});var l={};l.View=n.extend({initialize:function(t){t.type="checkbox",t.multiple=!0,n.prototype.initialize.call(this,t)}});var c={};return c.View=i.extend({initialize:function(t){i.prototype.initialize.call(this,t)},_setValue:function(t){void 0!==t&&(this.$("input").prop("checked",!1),this.$("label").removeClass("active"),this.$('[value="'+t+'"]').prop("checked",!0).closest("label").addClass("active"))},_templateOption:function(t){var e=a(" ").addClass("btn btn-default");return t.icon&&e.append(a(" ").addClass("fa").addClass(t.icon).addClass(!t.label&&"no-padding")),e.append(a(" ").attr({type:"radio",name:this.model.id,value:t.value})),t.label&&e.append(t.label),e},_template:function(){return a("
").addClass("btn-group ui-radiobutton").attr("data-toggle","buttons")}}),{Base:i,BaseIcons:n,Radio:s,RadioButton:c,Checkbox:l}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(13)],s=function(t,e){var i=o.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new o.Model({id:t.uid(),cls:"ui-select",error_text:"No options available",empty_text:"Nothing selected",visible:!0,wait:!1,multiple:!1,searchable:!0,optional:!1,disabled:!1,onchange:function(){}}).set(e),this.on("change",function(){i.model.get("onchange")(i.value())}),this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:disabled",this._changeDisabled,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:visible",this._changeVisible,this),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:multiple change:searchable change:cls change:id",this.render,this),this.render()},render:function(){var t=this;this.$el.empty().append(this.$select=a(" ")).append(this.$dropdown=a("
")).append(this.$resize=a("
").append(this.$resize_icon=a(" "))),this.$el.addClass(this.model.get("cls")).attr("id",this.model.get("id")),this.$select.addClass("select").attr("id",this.model.get("id")+"_select").prop("multiple",this.model.get("multiple")).on("change",function(){t.value(t._getValue()),t.trigger("change")}),this.$dropdown.hide(),this.model.get("multiple")||this.$dropdown.show().on("click",function(){t.$select.select2&&t.$select.select2("open")}),this.$resize.hide(),this.model.get("multiple")&&!this.model.get("searchable")&&(this.$resize_icon.addClass("fa fa-angle-double-right fa-rotate-45"),this.$resize.show().removeClass().addClass("icon-resize").off("mousedown").on("mousedown",function(e){var i=e.pageY,n=t.$select.height();t.minHeight=t.minHeight||n,a("#dd-helper").show().on("mousemove",function(e){t.$select.height(Math.max(n+(e.pageY-i),t.minHeight))}).on("mouseup mouseleave",function(){a("#dd-helper").hide().off()})})),this.all_button=null,this.model.get("multiple")&&(this.model.get("searchable")?(this.all_button=new e.ButtonCheck({onclick:function(){var e=[];0!==t.all_button.value()&&r.each(t.model.get("data"),function(t){e.push(t.value)}),t.value(e),t.trigger("change")}}),this.$el.prepend(this.all_button.$el)):this.$el.addClass("ui-select-multiple")),this._changeData(),this._changeWait(),this._changeVisible()},_changeData:function(){var t=this;this.$select.find("option").remove(),!this.model.get("multiple")&&this.model.get("optional")&&this.$select.append(this._templateOption({value:"__null__",label:t.model.get("empty_text")})),r.each(this.model.get("data"),function(e){t.$select.append(t._templateOption(e))}),0==this.length()?this.$select.prop("disabled",!0).append(this._templateOption({value:"__null__",label:this.model.get("error_text")})):this.$select.prop("disabled",!1),this.$select.select2("destroy"),this.model.get("searchable")&&(this.$select.select2({closeOnSelect:!this.model.get("multiple")}),this.$(".select2-container .select2-search input").off("blur")),this._changeValue()},_changeDisabled:function(){this.$select.prop("disabled",this.model.get("disabled"))},_changeWait:function(){this.$dropdown.removeClass().addClass("icon-dropdown fa").addClass(this.model.get("wait")?"fa-spinner fa-spin":"fa-caret-down")},_changeVisible:function(){this.$el[this.model.get("visible")?"show":"hide"](),this.$select[this.model.get("visible")?"show":"hide"]()},_changeValue:function(){this._setValue(this.model.get("value")),null!==this._getValue()||this.model.get("multiple")||this.model.get("optional")||this._setValue(this.first());var t=this._getValue();this.all_button&&this.all_button.value(a.isArray(t)?t.length:0,this.length())},value:function(t){return void 0!==t&&this.model.set("value",t),this._getValue()},first:function(){var t=this.$select.find("option").first();return t.length>0?t.val():null},exists:function(t){return this.$select.find('option[value="'+t+'"]').length>0},text:function(){return this.$select.find("option:selected").first().text()},show:function(){this.model.set("visible",!0)},hide:function(){this.model.set("visible",!1)},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},disabled:function(){return this.model.get("disabled")},enable:function(){this.model.set("disabled",!1)},disable:function(){this.model.set("disabled",!0)},add:function(t,e){r.each(this.model.get("data"),function(e){!r.findWhere(t,e)&&t.push(e)}),e&&t&&t.sort(e),this.model.set("data",t)},update:function(t){this.model.set("data",t)},setOnChange:function(t){this.model.set("onchange",t)},length:function(){return a.isArray(this.model.get("data"))?this.model.get("data").length:0},_setValue:function(t){void 0!==t&&(t=null!==t?t:"__null__",this.$select.val(t),this.$select.select2&&this.$select.select2("val",t))},_getValue:function(){var e=this.$select.val();return t.isEmpty(e)?null:e},_templateOption:function(t){return a(" ").attr("value",t.value).html(r.escape(t.label))}});return{View:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s,o;(function(i,a){!function(i,a){s=[],n=a,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(this,function(){var t=function(t){t=t||{},t.tooltipConfig=t.tooltipConfig||{placement:"bottom"},t.classes=["icon-btn"].concat(t.classes||[]),t.disabled&&t.classes.push("disabled");var e=['',' '," "].join(""),n=i(e).tooltip(t.tooltipConfig);return a.isFunction(t.onclick)&&n.click(t.onclick),n};return t})}).call(e,i(1),i(2))},,function(t,e,i){var n,s;(function(o,a,r){n=[i(4)],s=function(t){var e=o.View.extend({optionsDefault:{with_close:!0,title:null,placement:"top",container:"body",body:null},initialize:function(e){this.setElement(this._template()),this.uid=t.uid(),this.options=a.defaults(e||{},this.optionsDefault),this.options.container.parent().append(this.el),this.$title=this.$(".popover-title-label"),this.$close=this.$(".popover-close"),this.$body=this.$(".popover-content"),this.options.body&&this.append(this.options.body);var i=this;r("body").on("mousedown."+this.uid,function(t){i.visible&&!r(i.options.container).is(t.target)&&!r(i.el).is(t.target)&&0===r(i.el).has(t.target).length&&i.hide()})},render:function(){this.$title.html(this.options.title),this.$el.removeClass().addClass("ui-popover popover fade in").addClass(this.options.placement),this.$el.css(this._get_placement(this.options.placement));var t=this;this.options.with_close?this.$close.on("click",function(){t.hide()}).show():this.$close.off().hide()},title:function(t){void 0!==t&&(this.options.title=t,this.$title.html(t))},show:function(){this.render(),this.$el.show(),this.visible=!0},hide:function(){this.$el.hide(),this.visible=!1},append:function(t){this.$body.append(t)},empty:function(){this.$body.empty()},remove:function(){r("body").off("mousedown."+this.uid),this.$el.remove()},_get_placement:function(t){var e=this._get_width(this.$el),i=this.$el.height(),n=this.options.container,s=this._get_width(n),o=this._get_height(n),a=n.position(),r=left=0;if(-1!=["top","bottom"].indexOf(t))switch(left=a.left-e+(s+e)/2,t){case"top":r=a.top-i-5;break;case"bottom":r=a.top+o+5}else switch(r=a.top-i+(o+i)/2,t){case"right":left=a.left+s}return{top:r,left:left}},_get_width:function(t){return t.width()+parseInt(t.css("padding-left"))+parseInt(t.css("margin-left"))+parseInt(t.css("padding-right"))+parseInt(t.css("margin-right"))},_get_height:function(t){return t.height()+parseInt(t.css("padding-top"))+parseInt(t.css("padding-bottom"))},_template:function(t){return''}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){var e=o.View.extend({optionsDefault:{css:"",placeholder:"No data available",data:[],value:null,multiple:!1,minimumInputLength:0,initialData:""},initialize:function(e){if(this.options=t.merge(e,this.optionsDefault),this.setElement(this._template(this.options)),!this.options.container)return void console.log("ui-select::initialize() : container not specified.");if(this.options.container.append(this.$el),this.select_data=this.options.data,this._refresh(),!this.options.multiple){this.options.value&&this._setValue(this.options.value);var i=this;this.options.onchange&&this.$el.on("change",function(){i.options.onchange(i.value())})}},value:function(t){var e=this._getValue();void 0!==t&&this._setValue(t);var i=this._getValue();return i!=e&&this.options.onchange&&this.options.onchange(i),i},text:function(){return this.$el.select2("data").text},disabled:function(){return!this.$el.select2("enable")},enable:function(){this.$el.select2("enable",!0)},disable:function(){this.$el.select2("enable",!1)},add:function(t){this.select_data.push({id:t.id,text:t.text}),this._refresh()},del:function(t){var e=this._getIndex(t);-1!=e&&(this.select_data.splice(e,1),this._refresh())},remove:function(){this.$el.select2("destroy")},update:function(t){this.select_data=[];for(var e in t.data)this.select_data.push(t.data[e]);this._refresh()},_refresh:function(){if(this.options.multiple){var t={multiple:this.options.multiple,containerCssClass:this.options.css,placeholder:this.options.placeholder,minimumInputLength:this.options.minimumInputLength,ajax:this.options.ajax,dropdownCssClass:this.options.dropdownCssClass,escapeMarkup:this.options.escapeMarkup,formatResult:this.options.formatResult,formatSelection:this.options.formatSelection,initSelection:this.options.initSelection,initialData:this.options.initialData};this.$el.select2(t)}else{var e=this._getValue(),t={data:this.select_data,containerCssClass:this.options.css,placeholder:this.options.placeholder,dropdownAutoWidth:!0};this.$el.select2(t),this._setValue(e)}},_getIndex:function(t){a.findIndex(this.select_data,{id:t})},_getValue:function(){return this.$el.select2("val")},_setValue:function(t){var e=this._getIndex(t);-1==e&&this.select_data.length>0&&(t=this.select_data[0].id),this.$el.select2("val",t)},_template:function(t){return' '}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2))},function(t,e){function i(t){function e(t){s.push(t)}if("string"==typeof t){var n={},s=[],o=i.call(n,e);return o.parse(t),{entries:s,errors:o.getErrors()}}if("function"!=typeof t)throw"Invalid parser construction.";return this.STATES_={ENTRY_OR_JUNK:0,OBJECT_TYPE:1,ENTRY_KEY:2,KV_KEY:3,EQUALS:4,KV_VALUE:5},this.DATA_={},this.CALLBACK_=t,this.CHAR_=0,this.LINE_=1,this.CHAR_IN_LINE_=0,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.PARSETMP_={},this.SKIPTILLEOL_=!1,this.VALBRACES_=null,this.BRACETYPE_=null,this.BRACECOUNT_=0,this.STATE_=this.STATES_.ENTRY_OR_JUNK,this.ERRORS_=[],this.ENTRY_TYPES_={inproceedings:1,proceedings:2,article:3,techreport:4,misc:5,mastersthesis:6,book:7,phdthesis:8,incollection:9,unpublished:10,inbook:11,manual:12,periodical:13,booklet:14,masterthesis:15,conference:16,online:998,data:999},this.MACROS_={jan:"January",feb:"February",mar:"March",apr:"April",may:"May",jun:"June",jul:"July",aug:"August",sep:"September",oct:"October",nov:"November",dec:"December",Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"},this.getErrors=function(){return this.ERRORS_},this.parse=function(t){for(var e=0;en;n++){var l=i[n],c=!1;"\\"==l&&a-1>n?l=i[++n]:"{"!=l&&"}"!=l||(c=!0),c||(r+=l)}t.Fields[e]=r}if("string"==t.ObjectType)for(var e in t.Fields)this.MACROS_[e]=t.Fields[e];else this.CALLBACK_(t)},this.processCharacter_=function(t){if(this.CHAR_++,this.CHAR_IN_LINE_++,"\n"==t&&(this.LINE_++,this.CHAR_IN_LINE_=1),this.SKIPTILLEOL_)return void("\n"==t&&(this.SKIPTILLEOL_=!1));if(this.SKIPCOMMENT_&&"%"==t)return void(this.SKIPTILLEOL_=!0);if(!this.SKIPWS_||!/\s/.test(t)){this.SKIPWS_=!1,this.SKIPCOMMENT_=!1,this.SKIPTILLEOL_=!1;for(var e=!0;e;)switch(e=!1,this.STATE_){case this.STATES_.ENTRY_OR_JUNK:"@"==t&&(this.STATE_=this.STATES_.OBJECT_TYPE,this.DATA_={ObjectType:""}),this.BRACETYPE_=null,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;break;case this.STATES_.OBJECT_TYPE:if(/[A-Za-z]/.test(t))this.DATA_.ObjectType+=t.toLowerCase(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;else{var i=this.DATA_.ObjectType;"comment"==i?this.STATE_=this.STATES_.ENTRY_OR_JUNK:"string"==i?(this.DATA_.ObjectType=i,this.DATA_.Fields={},this.BRACETYPE_=t,this.BRACECOUNT_=1,this.STATE_=this.STATES_.KV_KEY,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.PARSETMP_={Key:""}):"preamble"==i?this.STATE_=this.STATES_.ENTRY_OR_JUNK:i in this.ENTRY_TYPES_?(this.DATA_.ObjectType="entry",this.DATA_.EntryType=i,this.DATA_.EntryKey="",this.STATE_=this.STATES_.ENTRY_KEY,e=!0):(this.error_('Unrecognized object type: "'+this.DATA_.ObjectType+'"'),this.STATE_=this.STATES_.ENTRY_OR_JUNK)}break;case this.STATES_.ENTRY_KEY:if(("{"===t||"("===t)&&null==this.BRACETYPE_){this.BRACETYPE_=t,this.BRACECOUNT_=1,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;break}/[,%\s]/.test(t)?this.DATA_.EntryKey.length<1?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0):null==this.BRACETYPE_?(this.error_("No opening brace for object."),this.STATE_=this.STATES_.ENTRY_OR_JUNK):(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,e=!0,this.STATE_=this.STATES_.KV_KEY,this.PARSETMP_.Key="",this.DATA_.Fields={}):(this.DATA_.EntryKey+=t,this.SKIPWS_=!1,this.SKIPCOMMENT_=!1);break;case this.STATES_.KV_KEY:if("}"==t&&"{"==this.BRACETYPE_||")"==t&&"("==this.BRACETYPE_){this.processEntry_(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.ENTRY_OR_JUNK;break}/[\-A-Za-z:]/.test(t)?(this.PARSETMP_.Key+=t,this.SKIPWS_=!1,this.SKIPCOMMENT_=!1):this.PARSETMP_.Key.length<1?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0):(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.EQUALS,e=!0);break;case this.STATES_.EQUALS:if("}"==t&&"{"==this.BRACETYPE_||")"==t&&"("==this.BRACETYPE_){this.error_('Key-value pair has key "'+this.PARSETMP_.Key+'", but no value.'),this.processEntry_(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.ENTRY_OR_JUNK;break}"="==t&&(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_VALUE,this.PARSETMP_.Value="",this.VALBRACES_={'"':[],"{":[]});break;case this.STATES_.KV_VALUE:var n=this.VALBRACES_,s=this.PARSETMP_.Value,o=!1;if('"'==t||"{"==t||"}"==t||","==t){if(","==t&&0===n['"'].length+n["{"].length){var a=this.PARSETMP_.Value.trim();a in this.MACROS_?this.PARSETMP_.Value=this.MACROS_[a]:this.error_("Reference to an undefined macro: "+a),o=!0}if('"'==t){if(0===n['"'].length+n["{"].length){n['"'].push(this.CHAR_),this.SKIPWS_=!1,this.SKIPCOMMENT_=!1;break}1!=n['"'].length||0!=n["{"].length||0!=s.length&&"\\"==s[s.length-1]||(o=!0)}if("{"==t&&(0!=s.length&&"\\"==s[s.length-1]||(n["{"].push(this.CHAR_),this.SKIPWS_=!1,this.SKIPCOMMENT_=!1)),"}"==t)if(0===n['"'].length+n["{"].length){var a=this.PARSETMP_.Value.trim();a in this.MACROS_?this.PARSETMP_.Value=this.MACROS_[a]:this.error_("Reference to an undefined macro: "+a),e=!0,o=!0}else 0!=s.length&&"\\"==s[s.length-1]||n["{"].length>0&&(n["{"].splice(n["{"].length-1,1),0==n["{"].length+n['"'].length&&(o=!0))}o?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_KEY,this.DATA_.Fields[this.PARSETMP_.Key]=this.PARSETMP_.Value,this.PARSETMP_={Key:""},this.VALBRACES_=null):this.PARSETMP_.Value+=t}}},this.CHARCONV_=[[/\\space /g," "],[/\\textdollar /g,"$"],[/\\textquotesingle /g,"'"],[/\\ast /g,"*"],[/\\textbackslash /g,"\\"],[/\\\^\{\}/g,"^"],[/\\textasciigrave /g,"`"],[/\\lbrace /g,"{"],[/\\vert /g,"|"],[/\\rbrace /g,"}"],[/\\textasciitilde /g,"~"],[/\\textexclamdown /g,"¡"],[/\\textcent /g,"¢"],[/\\textsterling /g,"£"],[/\\textcurrency /g,"¤"],[/\\textyen /g,"¥"],[/\\textbrokenbar /g,"¦"],[/\\textsection /g,"§"],[/\\textasciidieresis /g,"¨"],[/\\textcopyright /g,"©"],[/\\textordfeminine /g,"ª"],[/\\guillemotleft /g,"«"],[/\\lnot /g,"¬"],[/\\textregistered /g,"®"],[/\\textasciimacron /g,"¯"],[/\\textdegree /g,"°"],[/\\pm /g,"±"],[/\\textasciiacute /g,"´"],[/\\mathrm\{\\mu\}/g,"µ"],[/\\textparagraph /g,"¶"],[/\\cdot /g,"·"],[/\\c\{\}/g,"¸"],[/\\textordmasculine /g,"º"],[/\\guillemotright /g,"»"],[/\\textonequarter /g,"¼"],[/\\textonehalf /g,"½"],[/\\textthreequarters /g,"¾"],[/\\textquestiondown /g,"¿"],[/\\`\{A\}/g,"À"],[/\\'\{A\}/g,"Á"],[/\\\^\{A\}/g,"Â"],[/\\~\{A\}/g,"Ã"],[/\\"\{A\}/g,"Ä"],[/\\AA /g,"Å"],[/\\AE /g,"Æ"],[/\\c\{C\}/g,"Ç"],[/\\`\{E\}/g,"È"],[/\\'\{E\}/g,"É"],[/\\\^\{E\}/g,"Ê"],[/\\"\{E\}/g,"Ë"],[/\\`\{I\}/g,"Ì"],[/\\'\{I\}/g,"Í"],[/\\\^\{I\}/g,"Î"],[/\\"\{I\}/g,"Ï"],[/\\DH /g,"Ð"],[/\\~\{N\}/g,"Ñ"],[/\\`\{O\}/g,"Ò"],[/\\'\{O\}/g,"Ó"],[/\\\^\{O\}/g,"Ô"],[/\\~\{O\}/g,"Õ"],[/\\"\{O\}/g,"Ö"],[/\\texttimes /g,"×"],[/\\O /g,"Ø"],[/\\`\{U\}/g,"Ù"],[/\\'\{U\}/g,"Ú"],[/\\\^\{U\}/g,"Û"],[/\\"\{U\}/g,"Ü"],[/\\'\{Y\}/g,"Ý"],[/\\TH /g,"Þ"],[/\\ss /g,"ß"],[/\\`\{a\}/g,"à"],[/\\'\{a\}/g,"á"],[/\\\^\{a\}/g,"â"],[/\\~\{a\}/g,"ã"],[/\\"\{a\}/g,"ä"],[/\\aa /g,"å"],[/\\ae /g,"æ"],[/\\c\{c\}/g,"ç"],[/\\`\{e\}/g,"è"],[/\\'\{e\}/g,"é"],[/\\\^\{e\}/g,"ê"],[/\\"\{e\}/g,"ë"],[/\\`\{\\i\}/g,"ì"],[/\\'\{\\i\}/g,"í"],[/\\\^\{\\i\}/g,"î"],[/\\"\{\\i\}/g,"ï"],[/\\dh /g,"ð"],[/\\~\{n\}/g,"ñ"],[/\\`\{o\}/g,"ò"],[/\\'\{o\}/g,"ó"],[/\\\^\{o\}/g,"ô"],[/\\~\{o\}/g,"õ"],[/\\"\{o\}/g,"ö"],[/\\div /g,"÷"],[/\\o /g,"ø"],[/\\`\{u\}/g,"ù"],[/\\'\{u\}/g,"ú"],[/\\\^\{u\}/g,"û"],[/\\"\{u\}/g,"ü"],[/\\'\{y\}/g,"ý"],[/\\th /g,"þ"],[/\\"\{y\}/g,"ÿ"],[/\\=\{A\}/g,"Ā"],[/\\=\{a\}/g,"ā"],[/\\u\{A\}/g,"Ă"],[/\\u\{a\}/g,"ă"],[/\\k\{A\}/g,"Ą"],[/\\k\{a\}/g,"ą"],[/\\'\{C\}/g,"Ć"],[/\\'\{c\}/g,"ć"],[/\\\^\{C\}/g,"Ĉ"],[/\\\^\{c\}/g,"ĉ"],[/\\.\{C\}/g,"Ċ"],[/\\.\{c\}/g,"ċ"],[/\\v\{C\}/g,"Č"],[/\\v\{c\}/g,"č"],[/\\v\{D\}/g,"Ď"],[/\\v\{d\}/g,"ď"],[/\\DJ /g,"Đ"],[/\\dj /g,"đ"],[/\\=\{E\}/g,"Ē"],[/\\=\{e\}/g,"ē"],[/\\u\{E\}/g,"Ĕ"],[/\\u\{e\}/g,"ĕ"],[/\\.\{E\}/g,"Ė"],[/\\.\{e\}/g,"ė"],[/\\k\{E\}/g,"Ę"],[/\\k\{e\}/g,"ę"],[/\\v\{E\}/g,"Ě"],[/\\v\{e\}/g,"ě"],[/\\\^\{G\}/g,"Ĝ"],[/\\\^\{g\}/g,"ĝ"],[/\\u\{G\}/g,"Ğ"],[/\\u\{g\}/g,"ğ"],[/\\.\{G\}/g,"Ġ"],[/\\.\{g\}/g,"ġ"],[/\\c\{G\}/g,"Ģ"],[/\\c\{g\}/g,"ģ"],[/\\\^\{H\}/g,"Ĥ"],[/\\\^\{h\}/g,"ĥ"],[/\\Elzxh /g,"ħ"],[/\\~\{I\}/g,"Ĩ"],[/\\~\{\\i\}/g,"ĩ"],[/\\=\{I\}/g,"Ī"],[/\\=\{\\i\}/g,"ī"],[/\\u\{I\}/g,"Ĭ"],[/\\u\{\\i\}/g,"ĭ"],[/\\k\{I\}/g,"Į"],[/\\k\{i\}/g,"į"],[/\\.\{I\}/g,"İ"],[/\\i /g,"ı"],[/\\\^\{J\}/g,"Ĵ"],[/\\\^\{\\j\}/g,"ĵ"],[/\\c\{K\}/g,"Ķ"],[/\\c\{k\}/g,"ķ"],[/\\'\{L\}/g,"Ĺ"],[/\\'\{l\}/g,"ĺ"],[/\\c\{L\}/g,"Ļ"],[/\\c\{l\}/g,"ļ"],[/\\v\{L\}/g,"Ľ"],[/\\v\{l\}/g,"ľ"],[/\\L /g,"Ł"],[/\\l /g,"ł"],[/\\'\{N\}/g,"Ń"],[/\\'\{n\}/g,"ń"],[/\\c\{N\}/g,"Ņ"],[/\\c\{n\}/g,"ņ"],[/\\v\{N\}/g,"Ň"],[/\\v\{n\}/g,"ň"],[/\\NG /g,"Ŋ"],[/\\ng /g,"ŋ"],[/\\=\{O\}/g,"Ō"],[/\\=\{o\}/g,"ō"],[/\\u\{O\}/g,"Ŏ"],[/\\u\{o\}/g,"ŏ"],[/\\H\{O\}/g,"Ő"],[/\\H\{o\}/g,"ő"],[/\\OE /g,"Œ"],[/\\oe /g,"œ"],[/\\'\{R\}/g,"Ŕ"],[/\\'\{r\}/g,"ŕ"],[/\\c\{R\}/g,"Ŗ"],[/\\c\{r\}/g,"ŗ"],[/\\v\{R\}/g,"Ř"],[/\\v\{r\}/g,"ř"],[/\\'\{S\}/g,"Ś"],[/\\'\{s\}/g,"ś"],[/\\\^\{S\}/g,"Ŝ"],[/\\\^\{s\}/g,"ŝ"],[/\\c\{S\}/g,"Ş"],[/\\c\{s\}/g,"ş"],[/\\v\{S\}/g,"Š"],[/\\v\{s\}/g,"š"],[/\\c\{T\}/g,"Ţ"],[/\\c\{t\}/g,"ţ"],[/\\v\{T\}/g,"Ť"],[/\\v\{t\}/g,"ť"],[/\\~\{U\}/g,"Ũ"],[/\\~\{u\}/g,"ũ"],[/\\=\{U\}/g,"Ū"],[/\\=\{u\}/g,"ū"],[/\\u\{U\}/g,"Ŭ"],[/\\u\{u\}/g,"ŭ"],[/\\r\{U\}/g,"Ů"],[/\\r\{u\}/g,"ů"],[/\\H\{U\}/g,"Ű"],[/\\H\{u\}/g,"ű"],[/\\k\{U\}/g,"Ų"],[/\\k\{u\}/g,"ų"],[/\\\^\{W\}/g,"Ŵ"],[/\\\^\{w\}/g,"ŵ"],[/\\\^\{Y\}/g,"Ŷ"],[/\\\^\{y\}/g,"ŷ"],[/\\"\{Y\}/g,"Ÿ"],[/\\'\{Z\}/g,"Ź"],[/\\'\{z\}/g,"ź"],[/\\.\{Z\}/g,"Ż"],[/\\.\{z\}/g,"ż"],[/\\v\{Z\}/g,"Ž"],[/\\v\{z\}/g,"ž"],[/\\texthvlig /g,"ƕ"],[/\\textnrleg /g,"ƞ"],[/\\eth /g,"ƪ"],[/\\textdoublepipe /g,"ǂ"],[/\\'\{g\}/g,"ǵ"],[/\\Elztrna /g,"ɐ"],[/\\Elztrnsa /g,"ɒ"],[/\\Elzopeno /g,"ɔ"],[/\\Elzrtld /g,"ɖ"],[/\\Elzschwa /g,"ə"],[/\\varepsilon /g,"ɛ"],[/\\Elzpgamma /g,"ɣ"],[/\\Elzpbgam /g,"ɤ"],[/\\Elztrnh /g,"ɥ"],[/\\Elzbtdl /g,"ɬ"],[/\\Elzrtll /g,"ɭ"],[/\\Elztrnm /g,"ɯ"],[/\\Elztrnmlr /g,"ɰ"],[/\\Elzltlmr /g,"ɱ"],[/\\Elzltln /g,"ɲ"],[/\\Elzrtln /g,"ɳ"],[/\\Elzclomeg /g,"ɷ"],[/\\textphi /g,"ɸ"],[/\\Elztrnr /g,"ɹ"],[/\\Elztrnrl /g,"ɺ"],[/\\Elzrttrnr /g,"ɻ"],[/\\Elzrl /g,"ɼ"],[/\\Elzrtlr /g,"ɽ"],[/\\Elzfhr /g,"ɾ"],[/\\Elzrtls /g,"ʂ"],[/\\Elzesh /g,"ʃ"],[/\\Elztrnt /g,"ʇ"],[/\\Elzrtlt /g,"ʈ"],[/\\Elzpupsil /g,"ʊ"],[/\\Elzpscrv /g,"ʋ"],[/\\Elzinvv /g,"ʌ"],[/\\Elzinvw /g,"ʍ"],[/\\Elztrny /g,"ʎ"],[/\\Elzrtlz /g,"ʐ"],[/\\Elzyogh /g,"ʒ"],[/\\Elzglst /g,"ʔ"],[/\\Elzreglst /g,"ʕ"],[/\\Elzinglst /g,"ʖ"],[/\\textturnk /g,"ʞ"],[/\\Elzdyogh /g,"ʤ"],[/\\Elztesh /g,"ʧ"],[/\\textasciicaron /g,"ˇ"],[/\\Elzverts /g,"ˈ"],[/\\Elzverti /g,"ˌ"],[/\\Elzlmrk /g,"ː"],[/\\Elzhlmrk /g,"ˑ"],[/\\Elzsbrhr /g,"˒"],[/\\Elzsblhr /g,"˓"],[/\\Elzrais /g,"˔"],[/\\Elzlow /g,"˕"],[/\\textasciibreve /g,"˘"],[/\\textperiodcentered /g,"˙"],[/\\r\{\}/g,"˚"],[/\\k\{\}/g,"˛"],[/\\texttildelow /g,"˜"],[/\\H\{\}/g,"˝"],[/\\tone\{55\}/g,"˥"],[/\\tone\{44\}/g,"˦"],[/\\tone\{33\}/g,"˧"],[/\\tone\{22\}/g,"˨"],[/\\tone\{11\}/g,"˩"],[/\\cyrchar\\C/g,"̏"],[/\\Elzpalh /g,"̡"],[/\\Elzrh /g,"̢"],[/\\Elzsbbrg /g,"̪"],[/\\Elzxl /g,"̵"],[/\\Elzbar /g,"̶"],[/\\'\{A\}/g,"Ά"],[/\\'\{E\}/g,"Έ"],[/\\'\{H\}/g,"Ή"],[/\\'\{\}\{I\}/g,"Ί"],[/\\'\{\}O/g,"Ό"],[/\\mathrm\{'Y\}/g,"Ύ"],[/\\mathrm\{'\\Omega\}/g,"Ώ"],[/\\acute\{\\ddot\{\\iota\}\}/g,"ΐ"],[/\\Alpha /g,"Α"],[/\\Beta /g,"Β"],[/\\Gamma /g,"Γ"],[/\\Delta /g,"Δ"],[/\\Epsilon /g,"Ε"],[/\\Zeta /g,"Ζ"],[/\\Eta /g,"Η"],[/\\Theta /g,"Θ"],[/\\Iota /g,"Ι"],[/\\Kappa /g,"Κ"],[/\\Lambda /g,"Λ"],[/\\Xi /g,"Ξ"],[/\\Pi /g,"Π"],[/\\Rho /g,"Ρ"],[/\\Sigma /g,"Σ"],[/\\Tau /g,"Τ"],[/\\Upsilon /g,"Υ"],[/\\Phi /g,"Φ"],[/\\Chi /g,"Χ"],[/\\Psi /g,"Ψ"],[/\\Omega /g,"Ω"],[/\\mathrm\{\\ddot\{I\}\}/g,"Ϊ"],[/\\mathrm\{\\ddot\{Y\}\}/g,"Ϋ"],[/\\'\{\$\\alpha\$\}/g,"ά"],[/\\acute\{\\epsilon\}/g,"έ"],[/\\acute\{\\eta\}/g,"ή"],[/\\acute\{\\iota\}/g,"ί"],[/\\acute\{\\ddot\{\\upsilon\}\}/g,"ΰ"],[/\\alpha /g,"α"],[/\\beta /g,"β"],[/\\gamma /g,"γ"],[/\\delta /g,"δ"],[/\\epsilon /g,"ε"],[/\\zeta /g,"ζ"],[/\\eta /g,"η"],[/\\texttheta /g,"θ"],[/\\iota /g,"ι"],[/\\kappa /g,"κ"],[/\\lambda /g,"λ"],[/\\mu /g,"μ"],[/\\nu /g,"ν"],[/\\xi /g,"ξ"],[/\\pi /g,"π"],[/\\rho /g,"ρ"],[/\\varsigma /g,"ς"],[/\\sigma /g,"σ"],[/\\tau /g,"τ"],[/\\upsilon /g,"υ"],[/\\varphi /g,"φ"],[/\\chi /g,"χ"],[/\\psi /g,"ψ"],[/\\omega /g,"ω"],[/\\ddot\{\\iota\}/g,"ϊ"],[/\\ddot\{\\upsilon\}/g,"ϋ"],[/\\'\{o\}/g,"ό"],[/\\acute\{\\upsilon\}/g,"ύ"],[/\\acute\{\\omega\}/g,"ώ"],[/\\Pisymbol\{ppi022\}\{87\}/g,"ϐ"],[/\\textvartheta /g,"ϑ"],[/\\Upsilon /g,"ϒ"],[/\\phi /g,"ϕ"],[/\\varpi /g,"ϖ"],[/\\Stigma /g,"Ϛ"],[/\\Digamma /g,"Ϝ"],[/\\digamma /g,"ϝ"],[/\\Koppa /g,"Ϟ"],[/\\Sampi /g,"Ϡ"],[/\\varkappa /g,"ϰ"],[/\\varrho /g,"ϱ"],[/\\textTheta /g,"ϴ"],[/\\backepsilon /g,"϶"],[/\\cyrchar\\CYRYO /g,"Ё"],[/\\cyrchar\\CYRDJE /g,"Ђ"],[/\\cyrchar\{\\'\\CYRG\}/g,"Ѓ"],[/\\cyrchar\\CYRIE /g,"Є"],[/\\cyrchar\\CYRDZE /g,"Ѕ"],[/\\cyrchar\\CYRII /g,"І"],[/\\cyrchar\\CYRYI /g,"Ї"],[/\\cyrchar\\CYRJE /g,"Ј"],[/\\cyrchar\\CYRLJE /g,"Љ"],[/\\cyrchar\\CYRNJE /g,"Њ"],[/\\cyrchar\\CYRTSHE /g,"Ћ"],[/\\cyrchar\{\\'\\CYRK\}/g,"Ќ"],[/\\cyrchar\\CYRUSHRT /g,"Ў"],[/\\cyrchar\\CYRDZHE /g,"Џ"],[/\\cyrchar\\CYRA /g,"А"],[/\\cyrchar\\CYRB /g,"Б"],[/\\cyrchar\\CYRV /g,"В"],[/\\cyrchar\\CYRG /g,"Г"],[/\\cyrchar\\CYRD /g,"Д"],[/\\cyrchar\\CYRE /g,"Е"],[/\\cyrchar\\CYRZH /g,"Ж"],[/\\cyrchar\\CYRZ /g,"З"],[/\\cyrchar\\CYRI /g,"И"],[/\\cyrchar\\CYRISHRT /g,"Й"],[/\\cyrchar\\CYRK /g,"К"],[/\\cyrchar\\CYRL /g,"Л"],[/\\cyrchar\\CYRM /g,"М"],[/\\cyrchar\\CYRN /g,"Н"],[/\\cyrchar\\CYRO /g,"О"],[/\\cyrchar\\CYRP /g,"П"],[/\\cyrchar\\CYRR /g,"Р"],[/\\cyrchar\\CYRS /g,"С"],[/\\cyrchar\\CYRT /g,"Т"],[/\\cyrchar\\CYRU /g,"У"],[/\\cyrchar\\CYRF /g,"Ф"],[/\\cyrchar\\CYRH /g,"Х"],[/\\cyrchar\\CYRC /g,"Ц"],[/\\cyrchar\\CYRCH /g,"Ч"],[/\\cyrchar\\CYRSH /g,"Ш"],[/\\cyrchar\\CYRSHCH /g,"Щ"],[/\\cyrchar\\CYRHRDSN /g,"Ъ"],[/\\cyrchar\\CYRERY /g,"Ы"],[/\\cyrchar\\CYRSFTSN /g,"Ь"],[/\\cyrchar\\CYREREV /g,"Э"],[/\\cyrchar\\CYRYU /g,"Ю"],[/\\cyrchar\\CYRYA /g,"Я"],[/\\cyrchar\\cyra /g,"а"],[/\\cyrchar\\cyrb /g,"б"],[/\\cyrchar\\cyrv /g,"в"],[/\\cyrchar\\cyrg /g,"г"],[/\\cyrchar\\cyrd /g,"д"],[/\\cyrchar\\cyre /g,"е"],[/\\cyrchar\\cyrzh /g,"ж"],[/\\cyrchar\\cyrz /g,"з"],[/\\cyrchar\\cyri /g,"и"],[/\\cyrchar\\cyrishrt /g,"й"],[/\\cyrchar\\cyrk /g,"к"],[/\\cyrchar\\cyrl /g,"л"],[/\\cyrchar\\cyrm /g,"м"],[/\\cyrchar\\cyrn /g,"н"],[/\\cyrchar\\cyro /g,"о"],[/\\cyrchar\\cyrp /g,"п"],[/\\cyrchar\\cyrr /g,"р"],[/\\cyrchar\\cyrs /g,"с"],[/\\cyrchar\\cyrt /g,"т"],[/\\cyrchar\\cyru /g,"у"],[/\\cyrchar\\cyrf /g,"ф"],[/\\cyrchar\\cyrh /g,"х"],[/\\cyrchar\\cyrc /g,"ц"],[/\\cyrchar\\cyrch /g,"ч"],[/\\cyrchar\\cyrsh /g,"ш"],[/\\cyrchar\\cyrshch /g,"щ"],[/\\cyrchar\\cyrhrdsn /g,"ъ"],[/\\cyrchar\\cyrery /g,"ы"],[/\\cyrchar\\cyrsftsn /g,"ь"],[/\\cyrchar\\cyrerev /g,"э"],[/\\cyrchar\\cyryu /g,"ю"],[/\\cyrchar\\cyrya /g,"я"],[/\\cyrchar\\cyryo /g,"ё"],[/\\cyrchar\\cyrdje /g,"ђ"],[/\\cyrchar\{\\'\\cyrg\}/g,"ѓ"],[/\\cyrchar\\cyrie /g,"є"],[/\\cyrchar\\cyrdze /g,"ѕ"],[/\\cyrchar\\cyrii /g,"і"],[/\\cyrchar\\cyryi /g,"ї"],[/\\cyrchar\\cyrje /g,"ј"],[/\\cyrchar\\cyrlje /g,"љ"],[/\\cyrchar\\cyrnje /g,"њ"],[/\\cyrchar\\cyrtshe /g,"ћ"],[/\\cyrchar\{\\'\\cyrk\}/g,"ќ"],[/\\cyrchar\\cyrushrt /g,"ў"],[/\\cyrchar\\cyrdzhe /g,"џ"],[/\\cyrchar\\CYROMEGA /g,"Ѡ"],[/\\cyrchar\\cyromega /g,"ѡ"],[/\\cyrchar\\CYRYAT /g,"Ѣ"],[/\\cyrchar\\CYRIOTE /g,"Ѥ"],[/\\cyrchar\\cyriote /g,"ѥ"],[/\\cyrchar\\CYRLYUS /g,"Ѧ"],[/\\cyrchar\\cyrlyus /g,"ѧ"],[/\\cyrchar\\CYRIOTLYUS /g,"Ѩ"],[/\\cyrchar\\cyriotlyus /g,"ѩ"],[/\\cyrchar\\CYRBYUS /g,"Ѫ"],[/\\cyrchar\\CYRIOTBYUS /g,"Ѭ"],[/\\cyrchar\\cyriotbyus /g,"ѭ"],[/\\cyrchar\\CYRKSI /g,"Ѯ"],[/\\cyrchar\\cyrksi /g,"ѯ"],[/\\cyrchar\\CYRPSI /g,"Ѱ"],[/\\cyrchar\\cyrpsi /g,"ѱ"],[/\\cyrchar\\CYRFITA /g,"Ѳ"],[/\\cyrchar\\CYRIZH /g,"Ѵ"],[/\\cyrchar\\CYRUK /g,"Ѹ"],[/\\cyrchar\\cyruk /g,"ѹ"],[/\\cyrchar\\CYROMEGARND /g,"Ѻ"],[/\\cyrchar\\cyromegarnd /g,"ѻ"],[/\\cyrchar\\CYROMEGATITLO /g,"Ѽ"],[/\\cyrchar\\cyromegatitlo /g,"ѽ"],[/\\cyrchar\\CYROT /g,"Ѿ"],[/\\cyrchar\\cyrot /g,"ѿ"],[/\\cyrchar\\CYRKOPPA /g,"Ҁ"],[/\\cyrchar\\cyrkoppa /g,"ҁ"],[/\\cyrchar\\cyrthousands /g,"҂"],[/\\cyrchar\\cyrhundredthousands /g,"҈"],[/\\cyrchar\\cyrmillions /g,"҉"],[/\\cyrchar\\CYRSEMISFTSN /g,"Ҍ"],[/\\cyrchar\\cyrsemisftsn /g,"ҍ"],[/\\cyrchar\\CYRRTICK /g,"Ҏ"],[/\\cyrchar\\cyrrtick /g,"ҏ"],[/\\cyrchar\\CYRGUP /g,"Ґ"],[/\\cyrchar\\cyrgup /g,"ґ"],[/\\cyrchar\\CYRGHCRS /g,"Ғ"],[/\\cyrchar\\cyrghcrs /g,"ғ"],[/\\cyrchar\\CYRGHK /g,"Ҕ"],[/\\cyrchar\\cyrghk /g,"ҕ"],[/\\cyrchar\\CYRZHDSC /g,"Җ"],[/\\cyrchar\\cyrzhdsc /g,"җ"],[/\\cyrchar\\CYRZDSC /g,"Ҙ"],[/\\cyrchar\\cyrzdsc /g,"ҙ"],[/\\cyrchar\\CYRKDSC /g,"Қ"],[/\\cyrchar\\cyrkdsc /g,"қ"],[/\\cyrchar\\CYRKVCRS /g,"Ҝ"],[/\\cyrchar\\cyrkvcrs /g,"ҝ"],[/\\cyrchar\\CYRKHCRS /g,"Ҟ"],[/\\cyrchar\\cyrkhcrs /g,"ҟ"],[/\\cyrchar\\CYRKBEAK /g,"Ҡ"],[/\\cyrchar\\cyrkbeak /g,"ҡ"],[/\\cyrchar\\CYRNDSC /g,"Ң"],[/\\cyrchar\\cyrndsc /g,"ң"],[/\\cyrchar\\CYRNG /g,"Ҥ"],[/\\cyrchar\\cyrng /g,"ҥ"],[/\\cyrchar\\CYRPHK /g,"Ҧ"],[/\\cyrchar\\cyrphk /g,"ҧ"],[/\\cyrchar\\CYRABHHA /g,"Ҩ"],[/\\cyrchar\\cyrabhha /g,"ҩ"],[/\\cyrchar\\CYRSDSC /g,"Ҫ"],[/\\cyrchar\\cyrsdsc /g,"ҫ"],[/\\cyrchar\\CYRTDSC /g,"Ҭ"],[/\\cyrchar\\cyrtdsc /g,"ҭ"],[/\\cyrchar\\CYRY /g,"Ү"],[/\\cyrchar\\cyry /g,"ү"],[/\\cyrchar\\CYRYHCRS /g,"Ұ"],[/\\cyrchar\\cyryhcrs /g,"ұ"],[/\\cyrchar\\CYRHDSC /g,"Ҳ"],[/\\cyrchar\\cyrhdsc /g,"ҳ"],[/\\cyrchar\\CYRTETSE /g,"Ҵ"],[/\\cyrchar\\cyrtetse /g,"ҵ"],[/\\cyrchar\\CYRCHRDSC /g,"Ҷ"],[/\\cyrchar\\cyrchrdsc /g,"ҷ"],[/\\cyrchar\\CYRCHVCRS /g,"Ҹ"],[/\\cyrchar\\cyrchvcrs /g,"ҹ"],[/\\cyrchar\\CYRSHHA /g,"Һ"],[/\\cyrchar\\cyrshha /g,"һ"],[/\\cyrchar\\CYRABHCH /g,"Ҽ"],[/\\cyrchar\\cyrabhch /g,"ҽ"],[/\\cyrchar\\CYRABHCHDSC /g,"Ҿ"],[/\\cyrchar\\cyrabhchdsc /g,"ҿ"],[/\\cyrchar\\CYRpalochka /g,"Ӏ"],[/\\cyrchar\\CYRKHK /g,"Ӄ"],[/\\cyrchar\\cyrkhk /g,"ӄ"],[/\\cyrchar\\CYRNHK /g,"Ӈ"],[/\\cyrchar\\cyrnhk /g,"ӈ"],[/\\cyrchar\\CYRCHLDSC /g,"Ӌ"],[/\\cyrchar\\cyrchldsc /g,"ӌ"],[/\\cyrchar\\CYRAE /g,"Ӕ"],[/\\cyrchar\\cyrae /g,"ӕ"],[/\\cyrchar\\CYRSCHWA /g,"Ә"],[/\\cyrchar\\cyrschwa /g,"ә"],[/\\cyrchar\\CYRABHDZE /g,"Ӡ"],[/\\cyrchar\\cyrabhdze /g,"ӡ"],[/\\cyrchar\\CYROTLD /g,"Ө"],[/\\cyrchar\\cyrotld /g,"ө"],[/\\hspace\{0.6em\}/g," "],[/\\hspace\{1em\}/g," "],[/\\hspace\{0.33em\}/g," "],[/\\hspace\{0.25em\}/g," "],[/\\hspace\{0.166em\}/g," "],[/\\hphantom\{0\}/g," "],[/\\hphantom\{,\}/g," "],[/\\hspace\{0.167em\}/g," "],[/\\mkern1mu /g," "],[/\\textendash /g,"–"],[/\\textemdash /g,"—"],[/\\rule\{1em\}\{1pt\}/g,"―"],[/\\Vert /g,"‖"],[/\\Elzreapos /g,"‛"],[/\\textquotedblleft /g,"“"],[/\\textquotedblright /g,"”"],[/\\textdagger /g,"†"],[/\\textdaggerdbl /g,"‡"],[/\\textbullet /g,"•"],[/\\ldots /g,"…"],[/\\textperthousand /g,"‰"],[/\\textpertenthousand /g,"‱"],[/\\backprime /g,"‵"],[/\\guilsinglleft /g,"‹"],[/\\guilsinglright /g,"›"],[/\\mkern4mu /g," "],[/\\nolinebreak /g,""],[/\\ensuremath\{\\Elzpes\}/g,"₧"],[/\\mbox\{\\texteuro\} /g,"€"],[/\\dddot /g,"⃛"],[/\\ddddot /g,"⃜"],[/\\mathbb\{C\}/g,"ℂ"],[/\\mathscr\{g\}/g,"ℊ"],[/\\mathscr\{H\}/g,"ℋ"],[/\\mathfrak\{H\}/g,"ℌ"],[/\\mathbb\{H\}/g,"ℍ"],[/\\hslash /g,"ℏ"],[/\\mathscr\{I\}/g,"ℐ"],[/\\mathfrak\{I\}/g,"ℑ"],[/\\mathscr\{L\}/g,"ℒ"],[/\\mathscr\{l\}/g,"ℓ"],[/\\mathbb\{N\}/g,"ℕ"],[/\\cyrchar\\textnumero /g,"№"],[/\\wp /g,"℘"],[/\\mathbb\{P\}/g,"ℙ"],[/\\mathbb\{Q\}/g,"ℚ"],[/\\mathscr\{R\}/g,"ℛ"],[/\\mathfrak\{R\}/g,"ℜ"],[/\\mathbb\{R\}/g,"ℝ"],[/\\Elzxrat /g,"℞"],[/\\texttrademark /g,"™"],[/\\mathbb\{Z\}/g,"ℤ"],[/\\Omega /g,"Ω"],[/\\mho /g,"℧"],[/\\mathfrak\{Z\}/g,"ℨ"],[/\\ElsevierGlyph\{2129\}/g,"℩"],[/\\AA /g,"Å"],[/\\mathscr\{B\}/g,"ℬ"],[/\\mathfrak\{C\}/g,"ℭ"],[/\\mathscr\{e\}/g,"ℯ"],[/\\mathscr\{E\}/g,"ℰ"],[/\\mathscr\{F\}/g,"ℱ"],[/\\mathscr\{M\}/g,"ℳ"],[/\\mathscr\{o\}/g,"ℴ"],[/\\aleph /g,"ℵ"],[/\\beth /g,"ℶ"],[/\\gimel /g,"ℷ"],[/\\daleth /g,"ℸ"],[/\\textfrac\{1\}\{3\}/g,"⅓"],[/\\textfrac\{2\}\{3\}/g,"⅔"],[/\\textfrac\{1\}\{5\}/g,"⅕"],[/\\textfrac\{2\}\{5\}/g,"⅖"],[/\\textfrac\{3\}\{5\}/g,"⅗"],[/\\textfrac\{4\}\{5\}/g,"⅘"],[/\\textfrac\{1\}\{6\}/g,"⅙"],[/\\textfrac\{5\}\{6\}/g,"⅚"],[/\\textfrac\{1\}\{8\}/g,"⅛"],[/\\textfrac\{3\}\{8\}/g,"⅜"],[/\\textfrac\{5\}\{8\}/g,"⅝"],[/\\textfrac\{7\}\{8\}/g,"⅞"],[/\\leftarrow /g,"←"],[/\\uparrow /g,"↑"],[/\\rightarrow /g,"→"],[/\\downarrow /g,"↓"],[/\\leftrightarrow /g,"↔"],[/\\updownarrow /g,"↕"],[/\\nwarrow /g,"↖"],[/\\nearrow /g,"↗"],[/\\searrow /g,"↘"],[/\\swarrow /g,"↙"],[/\\nleftarrow /g,"↚"],[/\\nrightarrow /g,"↛"],[/\\arrowwaveright /g,"↜"],[/\\arrowwaveright /g,"↝"],[/\\twoheadleftarrow /g,"↞"],[/\\twoheadrightarrow /g,"↠"],[/\\leftarrowtail /g,"↢"],[/\\rightarrowtail /g,"↣"],[/\\mapsto /g,"↦"],[/\\hookleftarrow /g,"↩"],[/\\hookrightarrow /g,"↪"],[/\\looparrowleft /g,"↫"],[/\\looparrowright /g,"↬"],[/\\leftrightsquigarrow /g,"↭"],[/\\nleftrightarrow /g,"↮"],[/\\Lsh /g,"↰"],[/\\Rsh /g,"↱"],[/\\ElsevierGlyph\{21B3\}/g,"↳"],[/\\curvearrowleft /g,"↶"],[/\\curvearrowright /g,"↷"],[/\\circlearrowleft /g,"↺"],[/\\circlearrowright /g,"↻"],[/\\leftharpoonup /g,"↼"],[/\\leftharpoondown /g,"↽"],[/\\upharpoonright /g,"↾"],[/\\upharpoonleft /g,"↿"],[/\\rightharpoonup /g,"⇀"],[/\\rightharpoondown /g,"⇁"],[/\\downharpoonright /g,"⇂"],[/\\downharpoonleft /g,"⇃"],[/\\rightleftarrows /g,"⇄"],[/\\dblarrowupdown /g,"⇅"],[/\\leftrightarrows /g,"⇆"],[/\\leftleftarrows /g,"⇇"],[/\\upuparrows /g,"⇈"],[/\\rightrightarrows /g,"⇉"],[/\\downdownarrows /g,"⇊"],[/\\leftrightharpoons /g,"⇋"],[/\\rightleftharpoons /g,"⇌"],[/\\nLeftarrow /g,"⇍"],[/\\nLeftrightarrow /g,"⇎"],[/\\nRightarrow /g,"⇏"],[/\\Leftarrow /g,"⇐"],[/\\Uparrow /g,"⇑"],[/\\Rightarrow /g,"⇒"],[/\\Downarrow /g,"⇓"],[/\\Leftrightarrow /g,"⇔"],[/\\Updownarrow /g,"⇕"],[/\\Lleftarrow /g,"⇚"],[/\\Rrightarrow /g,"⇛"],[/\\rightsquigarrow /g,"⇝"],[/\\DownArrowUpArrow /g,"⇵"],[/\\forall /g,"∀"],[/\\complement /g,"∁"],[/\\partial /g,"∂"],[/\\exists /g,"∃"],[/\\nexists /g,"∄"],[/\\varnothing /g,"∅"],[/\\nabla /g,"∇"],[/\\in /g,"∈"],[/\\not\\in /g,"∉"],[/\\ni /g,"∋"],[/\\not\\ni /g,"∌"],[/\\prod /g,"∏"],[/\\coprod /g,"∐"],[/\\sum /g,"∑"],[/\\mp /g,"∓"],[/\\dotplus /g,"∔"],[/\\setminus /g,"∖"],[/\\circ /g,"∘"],[/\\bullet /g,"∙"],[/\\surd /g,"√"],[/\\propto /g,"∝"],[/\\infty /g,"∞"],[/\\rightangle /g,"∟"],[/\\angle /g,"∠"],[/\\measuredangle /g,"∡"],[/\\sphericalangle /g,"∢"],[/\\mid /g,"∣"],[/\\nmid /g,"∤"],[/\\parallel /g,"∥"],[/\\nparallel /g,"∦"],[/\\wedge /g,"∧"],[/\\vee /g,"∨"],[/\\cap /g,"∩"],[/\\cup /g,"∪"],[/\\int /g,"∫"],[/\\int\\!\\int /g,"∬"],[/\\int\\!\\int\\!\\int /g,"∭"],[/\\oint /g,"∮"],[/\\surfintegral /g,"∯"],[/\\volintegral /g,"∰"],[/\\clwintegral /g,"∱"],[/\\ElsevierGlyph\{2232\}/g,"∲"],[/\\ElsevierGlyph\{2233\}/g,"∳"],[/\\therefore /g,"∴"],[/\\because /g,"∵"],[/\\Colon /g,"∷"],[/\\ElsevierGlyph\{2238\}/g,"∸"],[/\\mathbin\{\{:\}\\!\\!\{\-\}\\!\\!\{:\}\}/g,"∺"],[/\\homothetic /g,"∻"],[/\\sim /g,"∼"],[/\\backsim /g,"∽"],[/\\lazysinv /g,"∾"],[/\\wr /g,"≀"],[/\\not\\sim /g,"≁"],[/\\ElsevierGlyph\{2242\}/g,"≂"],[/\\NotEqualTilde /g,"≂-00338"],[/\\simeq /g,"≃"],[/\\not\\simeq /g,"≄"],[/\\cong /g,"≅"],[/\\approxnotequal /g,"≆"],[/\\not\\cong /g,"≇"],[/\\approx /g,"≈"],[/\\not\\approx /g,"≉"],[/\\approxeq /g,"≊"],[/\\tildetrpl /g,"≋"],[/\\not\\apid /g,"≋-00338"],[/\\allequal /g,"≌"],[/\\asymp /g,"≍"],[/\\Bumpeq /g,"≎"],[/\\NotHumpDownHump /g,"≎-00338"],[/\\bumpeq /g,"≏"],[/\\NotHumpEqual /g,"≏-00338"],[/\\doteq /g,"≐"],[/\\not\\doteq/g,"≐-00338"],[/\\doteqdot /g,"≑"],[/\\fallingdotseq /g,"≒"],[/\\risingdotseq /g,"≓"],[/\\eqcirc /g,"≖"],[/\\circeq /g,"≗"],[/\\estimates /g,"≙"],[/\\ElsevierGlyph\{225A\}/g,"≚"],[/\\starequal /g,"≛"],[/\\triangleq /g,"≜"],[/\\ElsevierGlyph\{225F\}/g,"≟"],[/\\not =/g,"≠"],[/\\equiv /g,"≡"],[/\\not\\equiv /g,"≢"],[/\\leq /g,"≤"],[/\\geq /g,"≥"],[/\\leqq /g,"≦"],[/\\geqq /g,"≧"],[/\\lneqq /g,"≨"],[/\\lvertneqq /g,"≨-0FE00"],[/\\gneqq /g,"≩"],[/\\gvertneqq /g,"≩-0FE00"],[/\\ll /g,"≪"],[/\\NotLessLess /g,"≪-00338"],[/\\gg /g,"≫"],[/\\NotGreaterGreater /g,"≫-00338"],[/\\between /g,"≬"],[/\\not\\kern\-0.3em\\times /g,"≭"],[/\\not/g,"≯"],[/\\not\\leq /g,"≰"],[/\\not\\geq /g,"≱"],[/\\lessequivlnt /g,"≲"],[/\\greaterequivlnt /g,"≳"],[/\\ElsevierGlyph\{2274\}/g,"≴"],[/\\ElsevierGlyph\{2275\}/g,"≵"],[/\\lessgtr /g,"≶"],[/\\gtrless /g,"≷"],[/\\notlessgreater /g,"≸"],[/\\notgreaterless /g,"≹"],[/\\prec /g,"≺"],[/\\succ /g,"≻"],[/\\preccurlyeq /g,"≼"],[/\\succcurlyeq /g,"≽"],[/\\precapprox /g,"≾"],[/\\NotPrecedesTilde /g,"≾-00338"],[/\\succapprox /g,"≿"],[/\\NotSucceedsTilde /g,"≿-00338"],[/\\not\\prec /g,"⊀"],[/\\not\\succ /g,"⊁"],[/\\subset /g,"⊂"],[/\\supset /g,"⊃"],[/\\not\\subset /g,"⊄"],[/\\not\\supset /g,"⊅"],[/\\subseteq /g,"⊆"],[/\\supseteq /g,"⊇"],[/\\not\\subseteq /g,"⊈"],[/\\not\\supseteq /g,"⊉"],[/\\subsetneq /g,"⊊"],[/\\varsubsetneqq /g,"⊊-0FE00"],[/\\supsetneq /g,"⊋"],[/\\varsupsetneq /g,"⊋-0FE00"],[/\\uplus /g,"⊎"],[/\\sqsubset /g,"⊏"],[/\\NotSquareSubset /g,"⊏-00338"],[/\\sqsupset /g,"⊐"],[/\\NotSquareSuperset /g,"⊐-00338"],[/\\sqsubseteq /g,"⊑"],[/\\sqsupseteq /g,"⊒"],[/\\sqcap /g,"⊓"],[/\\sqcup /g,"⊔"],[/\\oplus /g,"⊕"],[/\\ominus /g,"⊖"],[/\\otimes /g,"⊗"],[/\\oslash /g,"⊘"],[/\\odot /g,"⊙"],[/\\circledcirc /g,"⊚"],[/\\circledast /g,"⊛"],[/\\circleddash /g,"⊝"],[/\\boxplus /g,"⊞"],[/\\boxminus /g,"⊟"],[/\\boxtimes /g,"⊠"],[/\\boxdot /g,"⊡"],[/\\vdash /g,"⊢"],[/\\dashv /g,"⊣"],[/\\top /g,"⊤"],[/\\perp /g,"⊥"],[/\\truestate /g,"⊧"],[/\\forcesextra /g,"⊨"],[/\\Vdash /g,"⊩"],[/\\Vvdash /g,"⊪"],[/\\VDash /g,"⊫"],[/\\nvdash /g,"⊬"],[/\\nvDash /g,"⊭"],[/\\nVdash /g,"⊮"],[/\\nVDash /g,"⊯"],[/\\vartriangleleft /g,"⊲"],[/\\vartriangleright /g,"⊳"],[/\\trianglelefteq /g,"⊴"],[/\\trianglerighteq /g,"⊵"],[/\\original /g,"⊶"],[/\\image /g,"⊷"],[/\\multimap /g,"⊸"],[/\\hermitconjmatrix /g,"⊹"],[/\\intercal /g,"⊺"],[/\\veebar /g,"⊻"],[/\\rightanglearc /g,"⊾"],[/\\ElsevierGlyph\{22C0\}/g,"⋀"],[/\\ElsevierGlyph\{22C1\}/g,"⋁"],[/\\bigcap /g,"⋂"],[/\\bigcup /g,"⋃"],[/\\diamond /g,"⋄"],[/\\cdot /g,"⋅"],[/\\star /g,"⋆"],[/\\divideontimes /g,"⋇"],[/\\bowtie /g,"⋈"],[/\\ltimes /g,"⋉"],[/\\rtimes /g,"⋊"],[/\\leftthreetimes /g,"⋋"],[/\\rightthreetimes /g,"⋌"],[/\\backsimeq /g,"⋍"],[/\\curlyvee /g,"⋎"],[/\\curlywedge /g,"⋏"],[/\\Subset /g,"⋐"],[/\\Supset /g,"⋑"],[/\\Cap /g,"⋒"],[/\\Cup /g,"⋓"],[/\\pitchfork /g,"⋔"],[/\\lessdot /g,"⋖"],[/\\gtrdot /g,"⋗"],[/\\verymuchless /g,"⋘"],[/\\verymuchgreater /g,"⋙"],[/\\lesseqgtr /g,"⋚"],[/\\gtreqless /g,"⋛"],[/\\curlyeqprec /g,"⋞"],[/\\curlyeqsucc /g,"⋟"],[/\\not\\sqsubseteq /g,"⋢"],[/\\not\\sqsupseteq /g,"⋣"],[/\\Elzsqspne /g,"⋥"],[/\\lnsim /g,"⋦"],[/\\gnsim /g,"⋧"],[/\\precedesnotsimilar /g,"⋨"],[/\\succnsim /g,"⋩"],[/\\ntriangleleft /g,"⋪"],[/\\ntriangleright /g,"⋫"],[/\\ntrianglelefteq /g,"⋬"],[/\\ntrianglerighteq /g,"⋭"],[/\\vdots /g,"⋮"],[/\\cdots /g,"⋯"],[/\\upslopeellipsis /g,"⋰"],[/\\downslopeellipsis /g,"⋱"],[/\\barwedge /g,"⌅"],[/\\perspcorrespond /g,"⌆"],[/\\lceil /g,"⌈"],[/\\rceil /g,"⌉"],[/\\lfloor /g,"⌊"],[/\\rfloor /g,"⌋"],[/\\recorder /g,"⌕"],[/\\mathchar"2208/g,"⌖"],[/\\ulcorner /g,"⌜"],[/\\urcorner /g,"⌝"],[/\\llcorner /g,"⌞"],[/\\lrcorner /g,"⌟"],[/\\frown /g,"⌢"],[/\\smile /g,"⌣"],[/\\langle /g,"〈"],[/\\rangle /g,"〉"],[/\\ElsevierGlyph\{E838\}/g,"⌽"],[/\\Elzdlcorn /g,"⎣"],[/\\lmoustache /g,"⎰"],[/\\rmoustache /g,"⎱"],[/\\textvisiblespace /g,"␣"],[/\\ding\{172\}/g,"①"],[/\\ding\{173\}/g,"②"],[/\\ding\{174\}/g,"③"],[/\\ding\{175\}/g,"④"],[/\\ding\{176\}/g,"⑤"],[/\\ding\{177\}/g,"⑥"],[/\\ding\{178\}/g,"⑦"],[/\\ding\{179\}/g,"⑧"],[/\\ding\{180\}/g,"⑨"],[/\\ding\{181\}/g,"⑩"],[/\\circledS /g,"Ⓢ"],[/\\Elzdshfnc /g,"┆"],[/\\Elzsqfnw /g,"┙"],[/\\diagup /g,"╱"],[/\\ding\{110\}/g,"■"],[/\\square /g,"□"],[/\\blacksquare /g,"▪"],[/\\fbox\{~~\}/g,"▭"],[/\\Elzvrecto /g,"▯"],[/\\ElsevierGlyph\{E381\}/g,"▱"],[/\\ding\{115\}/g,"▲"],[/\\bigtriangleup /g,"△"],[/\\blacktriangle /g,"▴"],[/\\vartriangle /g,"▵"],[/\\blacktriangleright /g,"▸"],[/\\triangleright /g,"▹"],[/\\ding\{116\}/g,"▼"],[/\\bigtriangledown /g,"▽"],[/\\blacktriangledown /g,"▾"],[/\\triangledown /g,"▿"],[/\\blacktriangleleft /g,"◂"],[/\\triangleleft /g,"◃"],[/\\ding\{117\}/g,"◆"],[/\\lozenge /g,"◊"],[/\\bigcirc /g,"○"],[/\\ding\{108\}/g,"●"],[/\\Elzcirfl /g,"◐"],[/\\Elzcirfr /g,"◑"],[/\\Elzcirfb /g,"◒"],[/\\ding\{119\}/g,"◗"],[/\\Elzrvbull /g,"◘"],[/\\Elzsqfl /g,"◧"],[/\\Elzsqfr /g,"◨"],[/\\Elzsqfse /g,"◪"],[/\\bigcirc /g,"◯"],[/\\ding\{72\}/g,"★"],[/\\ding\{73\}/g,"☆"],[/\\ding\{37\}/g,"☎"],[/\\ding\{42\}/g,"☛"],[/\\ding\{43\}/g,"☞"],[/\\rightmoon /g,"☾"],[/\\mercury /g,"☿"],[/\\venus /g,"♀"],[/\\male /g,"♂"],[/\\jupiter /g,"♃"],[/\\saturn /g,"♄"],[/\\uranus /g,"♅"],[/\\neptune /g,"♆"],[/\\pluto /g,"♇"],[/\\aries /g,"♈"],[/\\taurus /g,"♉"],[/\\gemini /g,"♊"],[/\\cancer /g,"♋"],[/\\leo /g,"♌"],[/\\virgo /g,"♍"],[/\\libra /g,"♎"],[/\\scorpio /g,"♏"],[/\\sagittarius /g,"♐"],[/\\capricornus /g,"♑"],[/\\aquarius /g,"♒"],[/\\pisces /g,"♓"],[/\\ding\{171\}/g,"♠"],[/\\diamond /g,"♢"],[/\\ding\{168\}/g,"♣"],[/\\ding\{170\}/g,"♥"],[/\\ding\{169\}/g,"♦"],[/\\quarternote /g,"♩"],[/\\eighthnote /g,"♪"],[/\\flat /g,"♭"],[/\\natural /g,"♮"],[/\\sharp /g,"♯"],[/\\ding\{33\}/g,"✁"],[/\\ding\{34\}/g,"✂"],[/\\ding\{35\}/g,"✃"],[/\\ding\{36\}/g,"✄"],[/\\ding\{38\}/g,"✆"],[/\\ding\{39\}/g,"✇"],[/\\ding\{40\}/g,"✈"],[/\\ding\{41\}/g,"✉"],[/\\ding\{44\}/g,"✌"],[/\\ding\{45\}/g,"✍"],[/\\ding\{46\}/g,"✎"],[/\\ding\{47\}/g,"✏"],[/\\ding\{48\}/g,"✐"],[/\\ding\{49\}/g,"✑"],[/\\ding\{50\}/g,"✒"],[/\\ding\{51\}/g,"✓"],[/\\ding\{52\}/g,"✔"],[/\\ding\{53\}/g,"✕"],[/\\ding\{54\}/g,"✖"],[/\\ding\{55\}/g,"✗"],[/\\ding\{56\}/g,"✘"],[/\\ding\{57\}/g,"✙"],[/\\ding\{58\}/g,"✚"],[/\\ding\{59\}/g,"✛"],[/\\ding\{60\}/g,"✜"],[/\\ding\{61\}/g,"✝"],[/\\ding\{62\}/g,"✞"],[/\\ding\{63\}/g,"✟"],[/\\ding\{64\}/g,"✠"],[/\\ding\{65\}/g,"✡"],[/\\ding\{66\}/g,"✢"],[/\\ding\{67\}/g,"✣"],[/\\ding\{68\}/g,"✤"],[/\\ding\{69\}/g,"✥"],[/\\ding\{70\}/g,"✦"],[/\\ding\{71\}/g,"✧"],[/\\ding\{73\}/g,"✩"],[/\\ding\{74\}/g,"✪"],[/\\ding\{75\}/g,"✫"],[/\\ding\{76\}/g,"✬"],[/\\ding\{77\}/g,"✭"],[/\\ding\{78\}/g,"✮"],[/\\ding\{79\}/g,"✯"],[/\\ding\{80\}/g,"✰"],[/\\ding\{81\}/g,"✱"],[/\\ding\{82\}/g,"✲"],[/\\ding\{83\}/g,"✳"],[/\\ding\{84\}/g,"✴"],[/\\ding\{85\}/g,"✵"],[/\\ding\{86\}/g,"✶"],[/\\ding\{87\}/g,"✷"],[/\\ding\{88\}/g,"✸"],[/\\ding\{89\}/g,"✹"],[/\\ding\{90\}/g,"✺"],[/\\ding\{91\}/g,"✻"],[/\\ding\{92\}/g,"✼"],[/\\ding\{93\}/g,"✽"],[/\\ding\{94\}/g,"✾"],[/\\ding\{95\}/g,"✿"],[/\\ding\{96\}/g,"❀"],[/\\ding\{97\}/g,"❁"],[/\\ding\{98\}/g,"❂"],[/\\ding\{99\}/g,"❃"],[/\\ding\{100\}/g,"❄"],[/\\ding\{101\}/g,"❅"],[/\\ding\{102\}/g,"❆"],[/\\ding\{103\}/g,"❇"],[/\\ding\{104\}/g,"❈"],[/\\ding\{105\}/g,"❉"],[/\\ding\{106\}/g,"❊"],[/\\ding\{107\}/g,"❋"],[/\\ding\{109\}/g,"❍"],[/\\ding\{111\}/g,"❏"],[/\\ding\{112\}/g,"❐"],[/\\ding\{113\}/g,"❑"],[/\\ding\{114\}/g,"❒"],[/\\ding\{118\}/g,"❖"],[/\\ding\{120\}/g,"❘"],[/\\ding\{121\}/g,"❙"],[/\\ding\{122\}/g,"❚"],[/\\ding\{123\}/g,"❛"],[/\\ding\{124\}/g,"❜"],[/\\ding\{125\}/g,"❝"],[/\\ding\{126\}/g,"❞"],[/\\ding\{161\}/g,"❡"],[/\\ding\{162\}/g,"❢"],[/\\ding\{163\}/g,"❣"],[/\\ding\{164\}/g,"❤"],[/\\ding\{165\}/g,"❥"],[/\\ding\{166\}/g,"❦"],[/\\ding\{167\}/g,"❧"],[/\\ding\{182\}/g,"❶"],[/\\ding\{183\}/g,"❷"],[/\\ding\{184\}/g,"❸"],[/\\ding\{185\}/g,"❹"],[/\\ding\{186\}/g,"❺"],[/\\ding\{187\}/g,"❻"],[/\\ding\{188\}/g,"❼"],[/\\ding\{189\}/g,"❽"],[/\\ding\{190\}/g,"❾"],[/\\ding\{191\}/g,"❿"],[/\\ding\{192\}/g,"➀"],[/\\ding\{193\}/g,"➁"],[/\\ding\{194\}/g,"➂"],[/\\ding\{195\}/g,"➃"],[/\\ding\{196\}/g,"➄"],[/\\ding\{197\}/g,"➅"],[/\\ding\{198\}/g,"➆"],[/\\ding\{199\}/g,"➇"],[/\\ding\{200\}/g,"➈"],[/\\ding\{201\}/g,"➉"],[/\\ding\{202\}/g,"➊"],[/\\ding\{203\}/g,"➋"],[/\\ding\{204\}/g,"➌"],[/\\ding\{205\}/g,"➍"],[/\\ding\{206\}/g,"➎"],[/\\ding\{207\}/g,"➏"],[/\\ding\{208\}/g,"➐"],[/\\ding\{209\}/g,"➑"],[/\\ding\{210\}/g,"➒"],[/\\ding\{211\}/g,"➓"],[/\\ding\{212\}/g,"➔"],[/\\ding\{216\}/g,"➘"],[/\\ding\{217\}/g,"➙"],[/\\ding\{218\}/g,"➚"],[/\\ding\{219\}/g,"➛"],[/\\ding\{220\}/g,"➜"],[/\\ding\{221\}/g,"➝"],[/\\ding\{222\}/g,"➞"],[/\\ding\{223\}/g,"➟"],[/\\ding\{224\}/g,"➠"],[/\\ding\{225\}/g,"➡"],[/\\ding\{226\}/g,"➢"],[/\\ding\{227\}/g,"➣"],[/\\ding\{228\}/g,"➤"],[/\\ding\{229\}/g,"➥"],[/\\ding\{230\}/g,"➦"],[/\\ding\{231\}/g,"➧"],[/\\ding\{232\}/g,"➨"],[/\\ding\{233\}/g,"➩"],[/\\ding\{234\}/g,"➪"],[/\\ding\{235\}/g,"➫"],[/\\ding\{236\}/g,"➬"],[/\\ding\{237\}/g,"➭"],[/\\ding\{238\}/g,"➮"],[/\\ding\{239\}/g,"➯"],[/\\ding\{241\}/g,"➱"],[/\\ding\{242\}/g,"➲"],[/\\ding\{243\}/g,"➳"],[/\\ding\{244\}/g,"➴"],[/\\ding\{245\}/g,"➵"],[/\\ding\{246\}/g,"➶"],[/\\ding\{247\}/g,"➷"],[/\\ding\{248\}/g,"➸"],[/\\ding\{249\}/g,"➹"],[/\\ding\{250\}/g,"➺"],[/\\ding\{251\}/g,"➻"],[/\\ding\{252\}/g,"➼"],[/\\ding\{253\}/g,"➽"],[/\\ding\{254\}/g,"➾"],[/\\longleftarrow /g,"⟵"],[/\\longrightarrow /g,"⟶"],[/\\longleftrightarrow /g,"⟷"],[/\\Longleftarrow /g,"⟸"],[/\\Longrightarrow /g,"⟹"],[/\\Longleftrightarrow /g,"⟺"],[/\\longmapsto /g,"⟼"],[/\\sim\\joinrel\\leadsto/g,"⟿"],[/\\ElsevierGlyph\{E212\}/g,"⤅"],[/\\UpArrowBar /g,"⤒"],[/\\DownArrowBar /g,"⤓"],[/\\ElsevierGlyph\{E20C\}/g,"⤣"],[/\\ElsevierGlyph\{E20D\}/g,"⤤"],[/\\ElsevierGlyph\{E20B\}/g,"⤥"],[/\\ElsevierGlyph\{E20A\}/g,"⤦"],[/\\ElsevierGlyph\{E211\}/g,"⤧"],[/\\ElsevierGlyph\{E20E\}/g,"⤨"],[/\\ElsevierGlyph\{E20F\}/g,"⤩"],[/\\ElsevierGlyph\{E210\}/g,"⤪"],[/\\ElsevierGlyph\{E21C\}/g,"⤳"],[/\\ElsevierGlyph\{E21D\}/g,"⤳-00338"],[/\\ElsevierGlyph\{E21A\}/g,"⤶"],[/\\ElsevierGlyph\{E219\}/g,"⤷"],[/\\Elolarr /g,"⥀"],[/\\Elorarr /g,"⥁"],[/\\ElzRlarr /g,"⥂"],[/\\ElzrLarr /g,"⥄"],[/\\Elzrarrx /g,"⥇"],[/\\LeftRightVector /g,"⥎"],[/\\RightUpDownVector /g,"⥏"],[/\\DownLeftRightVector /g,"⥐"],[/\\LeftUpDownVector /g,"⥑"],[/\\LeftVectorBar /g,"⥒"],[/\\RightVectorBar /g,"⥓"],[/\\RightUpVectorBar /g,"⥔"],[/\\RightDownVectorBar /g,"⥕"],[/\\DownLeftVectorBar /g,"⥖"],[/\\DownRightVectorBar /g,"⥗"],[/\\LeftUpVectorBar /g,"⥘"],[/\\LeftDownVectorBar /g,"⥙"],[/\\LeftTeeVector /g,"⥚"],[/\\RightTeeVector /g,"⥛"],[/\\RightUpTeeVector /g,"⥜"],[/\\RightDownTeeVector /g,"⥝"],[/\\DownLeftTeeVector /g,"⥞"],[/\\DownRightTeeVector /g,"⥟"],[/\\LeftUpTeeVector /g,"⥠"],[/\\LeftDownTeeVector /g,"⥡"],[/\\UpEquilibrium /g,"⥮"],[/\\ReverseUpEquilibrium /g,"⥯"],[/\\RoundImplies /g,"⥰"],[/\\ElsevierGlyph\{E214\}/g,"⥼"],[/\\ElsevierGlyph\{E215\}/g,"⥽"],[/\\Elztfnc /g,"⦀"],[/\\ElsevierGlyph\{3018\}/g,"⦅"],[/\\Elroang /g,"⦆"],[/\\ElsevierGlyph\{E291\}/g,"⦔"],[/\\Elzddfnc /g,"⦙"],[/\\Angle /g,"⦜"],[/\\Elzlpargt /g,"⦠"],[/\\ElsevierGlyph\{E260\}/g,"⦵"],[/\\ElsevierGlyph\{E61B\}/g,"⦶"],[/\\ElzLap /g,"⧊"],[/\\Elzdefas /g,"⧋"],[/\\LeftTriangleBar /g,"⧏"],[/\\NotLeftTriangleBar /g,"⧏-00338"],[/\\RightTriangleBar /g,"⧐"],[/\\NotRightTriangleBar /g,"⧐-00338"],[/\\ElsevierGlyph\{E372\}/g,"⧜"],[/\\blacklozenge /g,"⧫"],[/\\RuleDelayed /g,"⧴"],[/\\Elxuplus /g,"⨄"],[/\\ElzThr /g,"⨅"],[/\\Elxsqcup /g,"⨆"],[/\\ElzInf /g,"⨇"],[/\\ElzSup /g,"⨈"],[/\\ElzCint /g,"⨍"],[/\\clockoint /g,"⨏"],[/\\ElsevierGlyph\{E395\}/g,"⨐"],[/\\sqrint /g,"⨖"],[/\\ElsevierGlyph\{E25A\}/g,"⨥"],[/\\ElsevierGlyph\{E25B\}/g,"⨪"],[/\\ElsevierGlyph\{E25C\}/g,"⨭"],[/\\ElsevierGlyph\{E25D\}/g,"⨮"],[/\\ElzTimes /g,"⨯"],[/\\ElsevierGlyph\{E25E\}/g,"⨴"],[/\\ElsevierGlyph\{E25E\}/g,"⨵"],[/\\ElsevierGlyph\{E259\}/g,"⨼"],[/\\amalg /g,"⨿"],[/\\ElzAnd /g,"⩓"],[/\\ElzOr /g,"⩔"],[/\\ElsevierGlyph\{E36E\}/g,"⩕"],[/\\ElOr /g,"⩖"],[/\\perspcorrespond /g,"⩞"],[/\\Elzminhat /g,"⩟"],[/\\ElsevierGlyph\{225A\}/g,"⩣"],[/\\stackrel\{*\}\{=\}/g,"⩮"],[/\\Equal /g,"⩵"],[/\\leqslant /g,"⩽"],[/\\nleqslant /g,"⩽-00338"],[/\\geqslant /g,"⩾"],[/\\ngeqslant /g,"⩾-00338"],[/\\lessapprox /g,"⪅"],[/\\gtrapprox /g,"⪆"],[/\\lneq /g,"⪇"],[/\\gneq /g,"⪈"],[/\\lnapprox /g,"⪉"],[/\\gnapprox /g,"⪊"],[/\\lesseqqgtr /g,"⪋"],[/\\gtreqqless /g,"⪌"],[/\\eqslantless /g,"⪕"],[/\\eqslantgtr /g,"⪖"],[/\\Pisymbol\{ppi020\}\{117\}/g,"⪝"],[/\\Pisymbol\{ppi020\}\{105\}/g,"⪞"],[/\\NestedLessLess /g,"⪡"],[/\\NotNestedLessLess /g,"⪡-00338"],[/\\NestedGreaterGreater /g,"⪢"],[/\\NotNestedGreaterGreater /g,"⪢-00338"],[/\\preceq /g,"⪯"],[/\\not\\preceq /g,"⪯-00338"],[/\\succeq /g,"⪰"],[/\\not\\succeq /g,"⪰-00338"],[/\\precneqq /g,"⪵"],[/\\succneqq /g,"⪶"],[/\\precapprox /g,"⪷"],[/\\succapprox /g,"⪸"],[/\\precnapprox /g,"⪹"],[/\\succnapprox /g,"⪺"],[/\\subseteqq /g,"⫅"],[/\\nsubseteqq /g,"⫅-00338"],[/\\supseteqq /g,"⫆"],[/\\nsupseteqq/g,"⫆-00338"],[/\\subsetneqq /g,"⫋"],[/\\supsetneqq /g,"⫌"],[/\\ElsevierGlyph\{E30D\}/g,"⫫"],[/\\Elztdcol /g,"⫶"],[/\\ElsevierGlyph\{300A\}/g,"《"],[/\\ElsevierGlyph\{300B\}/g,"》"],[/\\ElsevierGlyph\{3018\}/g,"〘"],[/\\ElsevierGlyph\{3019\}/g,"〙"],[/\\openbracketleft /g,"〚"],[/\\openbracketright /g,"〛"]],
+webpackJsonp([3,1],[function(t,e,i){(function(t,e){var n=i(1),s=n,o=i(58).GalaxyApp,a=i(56),r=i(11),l=i(87),c=i(86),d=i(60),h=i(19),u=i(45);window.app=function(i,n){window.Galaxy=new o(i,n),Galaxy.debug("analysis app");var p=i.config,g=new l({el:"#left",userIsAnonymous:Galaxy.user.isAnonymous(),search_url:p.search_url,toolbox:p.toolbox,toolbox_in_panel:p.toolbox_in_panel,stored_workflow_menu_entries:p.stored_workflow_menu_entries,nginx_upload_path:p.nginx_upload_path,ftp_upload_site:p.ftp_upload_site,default_genome:p.default_genome,default_extension:p.default_extension}),f=new r.CenterPanel({el:"#center"}),m=new c({el:"#right",galaxyRoot:Galaxy.root,userIsAnonymous:Galaxy.user.isAnonymous(),allow_user_dataset_purge:p.allow_user_dataset_purge}),v=new d.PageLayoutView(t.extend(i,{el:"body",left:g,center:f,right:m}));Galaxy.page=v,Galaxy.params=Galaxy.config.params,Galaxy.toolPanel=g.tool_panel,Galaxy.upload=g.uploadButton,Galaxy.currHistoryPanel=m.historyView,Galaxy.currHistoryPanel.listenToGalaxy(Galaxy),Galaxy.app={display:function(t,e){s(".select2-hidden-accessible").remove(),f.display(t)}};new(e.Router.extend({initialize:function(t){this.options=t},execute:function(t,e,i){Galaxy.debug("router execute:",t,e,i);var n=a.parse(e.pop());e.push(n),t&&t.apply(this,e)},routes:{"(/)":"home","(/)root*":"home","(/)tours(/)(:tour_id)":"show_tours"},show_tours:function(t){t?u.giveTour(t):f.display(new u.ToursView)},home:function(t){t.tool_id||t.job_id?"upload1"===t.tool_id?(Galaxy.upload.show(),this._loadCenterIframe("welcome")):this._loadToolForm(t):t.workflow_id?this._loadCenterIframe("workflow/run?id="+t.workflow_id):t.m_c?this._loadCenterIframe(t.m_c+"/"+t.m_a):this._loadCenterIframe("welcome")},_loadToolForm:function(t){t.id=t.tool_id,f.display(new h.View(t))},_loadCenterIframe:function(t,e){e=e||Galaxy.root,t=e+t,f.$("#galaxy_main").prop("src",t)}}))(i);s(function(){v.render().right.historyView.loadCurrentHistory(),Galaxy.listenTo(v.right.historyView,"history-size-change",function(){Galaxy.user.fetch({url:Galaxy.user.urlRoot()+"/"+(Galaxy.user.id||"current")})}),v.right.historyView.connectToQuotaMeter(v.masthead.quotaMeter),e.history.start({root:Galaxy.root,pushState:!0})})}}).call(e,i(2),i(3))},,,,,,,function(t,e,i){var n,s;(function(o,a){n=[i(4),i(22),i(52),i(21),i(48),i(13),i(8)],s=function(t,e,i,n,s,r,l){var c=o.View.extend({tagName:"label",initialize:function(t){this.model=t&&t.model||new o.Model(t),this.tagName=t.tagName||this.tagName,this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},title:function(t){this.model.set("title",t)},value:function(){return this.model.get("title")},render:function(){return this.$el.removeClass().addClass("ui-label").addClass(this.model.get("cls")).html(this.model.get("title")),this}}),d=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({message:null,status:"info",cls:"",persistent:!1}).set(t),this.listenTo(this.model,"change",this.render,this),this.render()},update:function(t){this.model.set(t)},render:function(){this.$el.removeClass().addClass("ui-message").addClass(this.model.get("cls"));var t=this.model.get("status");if(this.model.get("large")?this.$el.addClass(("success"==t&&"done"||"danger"==t&&"error"||t)+"messagelarge"):this.$el.addClass("alert").addClass("alert-"+t),this.model.get("message")){if(this.$el.html(this.model.get("message")),this.$el.fadeIn(),this.timeout&&window.clearTimeout(this.timeout),!this.model.get("persistent")){var e=this;this.timeout=window.setTimeout(function(){e.$el.fadeOut()},3e3)}}else this.$el.fadeOut();return this}}),h=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model({type:"text",placeholder:"",disabled:!1,visible:!0,cls:"",area:!1,color:null,style:null}).set(t),this.tagName=this.model.get("area")?"textarea":"input",this.setElement(a("<"+this.tagName+"/>")),this.listenTo(this.model,"change",this.render,this),this.render()},events:{input:"_onchange"},value:function(t){return void 0!==t&&this.model.set("value","string"==typeof t?t:""),this.model.get("value")},render:function(){return this.$el.removeClass().addClass("ui-"+this.tagName).addClass(this.model.get("cls")).addClass(this.model.get("style")).attr("id",this.model.id).attr("type",this.model.get("type")).attr("placeholder",this.model.get("placeholder")).css("color",this.model.get("color")||"").css("border-color",this.model.get("color")||""),this.model.get("value")!==this.$el.val()&&this.$el.val(this.model.get("value")),this.model.get("disabled")?this.$el.attr("disabled",!0):this.$el.removeAttr("disabled"),this.$el[this.model.get("visible")?"show":"hide"](),this},_onchange:function(){this.value(this.$el.val()),this.model.get("onchange")&&this.model.get("onchange")(this.model.get("value"))}}),u=o.View.extend({initialize:function(t){this.model=t&&t.model||new o.Model(t),this.setElement(a("
").append(this.$info=a("
")).append(this.$hidden=a("
"))),this.listenTo(this.model,"change",this.render,this),this.render()},value:function(t){return void 0!==t&&this.model.set("value",t),this.model.get("value")},render:function(){return this.$el.attr("id",this.model.id),this.$hidden.val(this.model.get("value")),this.model.get("info")?this.$info.show().html(this.model.get("info")):this.$info.hide(),this}});return{Button:r.ButtonDefault,ButtonIcon:r.ButtonIcon,ButtonCheck:r.ButtonCheck,ButtonMenu:r.ButtonMenu,ButtonLink:r.ButtonLink,Input:h,Label:c,Message:d,Modal:l,RadioButton:n.RadioButton,Checkbox:n.Checkbox,Radio:n.Radio,Select:e,Hidden:u,Slider:i,Drilldown:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(7)],s=function(t,e){var i=o.View.extend({visible:!1,initialize:function(i){var n=this;this.model=i&&i.model||new o.Model({id:t.uid(),cls:"ui-portlet",title:"",icon:"",buttons:null,body:null,scrollable:!0,nopadding:!1,operations:null,collapsible:!1,collapsible_button:!1,collapsed:!1}).set(i),this.setElement(this._template()),this.$body=this.$(".portlet-body"),this.$title_text=this.$(".portlet-title-text"),this.$title_icon=this.$(".portlet-title-icon"),this.$header=this.$(".portlet-header"),this.$content=this.$(".portlet-content"),this.$footer=this.$(".portlet-footer"),this.$backdrop=this.$(".portlet-backdrop"),this.$buttons=this.$(".portlet-buttons"),this.$operations=this.$(".portlet-operations"),this.model.get("body")&&this.append(this.model.get("body")),this.collapsible_button=new e.ButtonIcon({icon:"fa-eye",tooltip:"Collapse/Expand",cls:"ui-button-icon-plain",onclick:function(){n[n.collapsed?"expand":"collapse"]()}}),this.render()},render:function(){var t=this,e=this.model.attributes;return this.$el.removeClass().addClass(e.cls).attr("id",e.id),this.$header[e.title?"show":"hide"](),this.$title_text.html(e.title),a.each([this.$content,this.$body],function(t){t[e.nopadding?"addClass":"removeClass"]("no-padding")}),e.icon?this.$title_icon.removeClass().addClass("portlet-title-icon fa").addClass(e.icon).show():this.$title_icon.hide(),this.$title_text[e.collapsible?"addClass":"removeClass"]("no-highlight collapsible").off(),e.collapsible&&(this.$title_text.on("click",function(){t[t.collapsed?"expand":"collapse"]()}),e.collapsed?this.collapse():this.expand()),e.buttons?(this.$buttons.empty().show(),r.each(this.model.get("buttons"),function(e,i){i.$el.prop("id",e),t.$buttons.append(i.$el)})):this.$buttons.hide(),this.$operations.empty,e.collapsible_button&&this.$operations.append(this.collapsible_button.$el),e.operations&&r.each(e.operations,function(e,i){i.$el.prop("id",e),t.$operations.append(i.$el)}),this},append:function(t){this.$body.append(t)},empty:function(){this.$body.empty()},header:function(){return this.$header},body:function(){return this.$body},footer:function(){return this.$footer},show:function(){this.visible=!0,this.$el.fadeIn("fast")},hide:function(){this.visible=!1,this.$el.fadeOut("fast")},enableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!1)},disableButton:function(t){this.$buttons.find("#"+t).prop("disabled",!0)},hideOperation:function(t){this.$operations.find("#"+t).hide()},showOperation:function(t){this.$operations.find("#"+t).show()},setOperation:function(t,e){this.$operations.find("#"+t).off("click").on("click",e)},title:function(t){return t&&this.$title_text.html(t),this.$title_text.html()},collapse:function(){this.collapsed=!0,this.$content.height("0%"),this.$body.hide(),this.$footer.hide(),this.collapsible_button.setIcon("fa-eye-slash")},expand:function(){this.collapsed=!1,this.$content.height("100%"),this.$body.fadeIn("fast"),this.$footer.fadeIn("fast"),this.collapsible_button.setIcon("fa-eye")},disable:function(){this.$backdrop.show()},enable:function(){this.$backdrop.hide()},_template:function(){return r("
").append(r("
").addClass("portlet-header").append(r("
").addClass("portlet-operations")).append(r("
").addClass("portlet-title").append(r(" ").addClass("portlet-title-icon")).append(r(" ").addClass("portlet-title-text")))).append(r("
").addClass("portlet-content").append(r("
").addClass("portlet-body")).append(r("
").addClass("portlet-buttons"))).append(r("
").addClass("portlet-footer")).append(r("
").addClass("portlet-backdrop"))}});return{View:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;n=[],s=function(){"use strict";var t={UPLOAD:"upload",QUEUED:"queued",RUNNING:"running",SETTING_METADATA:"setting_metadata",NEW:"new",EMPTY:"empty",OK:"ok",PAUSED:"paused",FAILED_METADATA:"failed_metadata",NOT_VIEWABLE:"noPermission",DISCARDED:"discarded",ERROR:"error"};return t.READY_STATES=[t.OK,t.EMPTY,t.PAUSED,t.FAILED_METADATA,t.NOT_VIEWABLE,t.DISCARDED,t.ERROR],t.NOT_READY_STATES=[t.UPLOAD,t.QUEUED,t.RUNNING,t.SETTING_METADATA,t.NEW],t}.apply(e,n),!(void 0!==s&&(t.exports=s))},,function(t,e,i){var n,s;(function(o,a,r){n=[i(8),i(24),i(15)],s=function(t,e,i){var n=o.Model.extend({}),s=o.Model.extend({defaults:{id:"",type:"",name:"",hda_ldda:"hda",metadata:null},initialize:function(){this.get("metadata")||this._set_metadata(),this.on("change",this._set_metadata,this)},_set_metadata:function(){var t=new n;a.each(a.keys(this.attributes),function(e){if(0===e.indexOf("metadata_")){var i=e.split("metadata_")[1];t.set(i,this.attributes[e]),delete this.attributes[e]}},this),this.set("metadata",t,{silent:!0})},get_metadata:function(t){return this.attributes.metadata.get(t)},urlRoot:Galaxy.root+"api/datasets"}),l=s.extend({defaults:a.extend({},s.prototype.defaults,{chunk_url:null,first_data_chunk:null,chunk_index:-1,at_eof:!1}),initialize:function(t){s.prototype.initialize.call(this),this.attributes.chunk_index=this.attributes.first_data_chunk?1:0,this.attributes.chunk_url=Galaxy.root+"dataset/display?dataset_id="+this.id,this.attributes.url_viz=Galaxy.root+"visualization"},get_next_chunk:function(){if(this.attributes.at_eof)return null;var t=this,e=r.Deferred();return r.getJSON(this.attributes.chunk_url,{chunk:t.attributes.chunk_index++}).success(function(i){var n;""!==i.ck_data?n=i:(t.attributes.at_eof=!0,n=null),e.resolve(n)}),e}}),c=o.Collection.extend({model:s}),d=o.View.extend({initialize:function(t){this.row_count=0,this.loading_chunk=!1,new p({model:t.model,$el:this.$el})},expand_to_container:function(){this.$el.height()").attr("id","loading_indicator"),this.$el.append(this.loading_indicator);var t=r("").attr({id:"content_table",cellpadding:0});this.$el.append(t);var e=this.model.get_metadata("column_names"),i=r(" ").appendTo(t),n=r(" ").appendTo(i);if(e)n.append(""+e.join(" ")+" ");else for(var s=1;s<=this.model.get_metadata("columns");s++)n.append(""+s+" ");var o=this,a=this.model.get("first_data_chunk");a?this._renderChunk(a):r.when(o.model.get_next_chunk()).then(function(t){o._renderChunk(t)}),this.scroll_elt.scroll(function(){o.attempt_to_fetch()})},scrolled_to_bottom:function(){return!1},_renderCell:function(t,e,i){var n=r("").text(t),s=this.model.get_metadata("column_types");return void 0!==i?n.attr("colspan",i).addClass("stringalign"):s&&e"),n=this.model.get_metadata("columns");return this.row_count%2!==0&&i.addClass("dark_row"),e.length===n?a.each(e,function(t,e){i.append(this._renderCell(t,e))},this):e.length>n?(a.each(e.slice(0,n-1),function(t,e){i.append(this._renderCell(t,e))},this),i.append(this._renderCell(e.slice(n-1).join(" "),n-1))):n>5&&e.length===n-1?(a.each(e,function(t,e){i.append(this._renderCell(t,e))},this),i.append(r(""))):i.append(this._renderCell(t,0,n)),this.row_count++,i},_renderChunk:function(t){var e=this.$el.find("table");a.each(t.ck_data.split("\n"),function(t,i){""!==t&&e.append(this._renderRow(t))},this)}}),h=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),scroll_elt=a.find(this.$el.parents(),function(t){return"auto"===r(t).css("overflow")}),scroll_elt||(scroll_elt=window),this.scroll_elt=r(scroll_elt)},scrolled_to_bottom:function(){return this.$el.height()-this.scroll_elt.scrollTop()-this.scroll_elt.height()<=0}}),u=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),this.scroll_elt=this.$el.css({position:"relative",overflow:"scroll",height:t.height||"500px"})},scrolled_to_bottom:function(){return this.$el.scrollTop()+this.$el.innerHeight()>=this.el.scrollHeight}}),p=o.View.extend({col:{chrom:null,start:null,end:null},url_viz:null,dataset_id:null,genome_build:null,file_ext:null,initialize:function(t){function e(t,e){for(var i=0;i';return t.icon&&(e+=' '),e+=''+t.title+" "}}),i=e.extend({initialize:function(t){e.prototype.initialize.call(this,t)},_template:function(t){return' '}}),n=o.View.extend({initialize:function(e){this.options=t.merge(e,{title:"Select/Unselect all",icons:["fa fa-square-o","fa fa-minus-square-o","fa fa-check-square-o"],value:0}),this.setElement(this._template()),this.$title=this.$(".title"),this.$icon=this.$(".icon"),this.value(this.options.value),this.$title.html(this.options.title);var i=this;this.$el.on("click",function(){i.current=0===i.current&&2||0,i.value(i.current),i.options.onclick&&i.options.onclick()})},value:function(t,e){return void 0!==t&&(e&&0!==t&&(t=t!==e&&1||2),this.current=t,this.$icon.removeClass().addClass("icon").addClass(this.options.icons[t]),this.options.onchange&&this.options.onchange(t)),this.current},_template:function(){return'
'}}),s=o.View.extend({initialize:function(e){this.options=t.merge(e,{id:t.uid(),title:"",floating:"right",cls:"ui-button-icon",icon:"",tooltip:"",onclick:null}),this.setElement(this._template(this.options)),this.$button=this.$el.find(".button");var i=this;a(this.el).on("click",function(){a(".tooltip").hide(),e.onclick&&!i.disabled&&e.onclick()}),this.$button.tooltip({title:e.tooltip,placement:"bottom"})},disable:function(){this.$button.addClass("disabled"),this.disabled=!0},enable:function(){this.$button.removeClass("disabled"),this.disabled=!1},setIcon:function(t){this.$("i").removeClass(this.options.icon).addClass(t),this.options.icon=t},_template:function(t){var e="";t.title&&(e="width: auto;");var i='';return i+=t.title?' '+t.title+" ":' ',i+="
"}}),r=o.View.extend({$menu:null,initialize:function(e){this.options=t.merge(e,{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:""}),this.setElement(a(this._template(this.options)));var i=a(this.el).find(".root"),n=this;i.on("click",function(t){a(".tooltip").hide(),t.preventDefault(),n.options.onclick&&n.options.onclick()}),this.options.visible||this.hide(),i.tooltip({title:e.tooltip,placement:"bottom"})},show:function(){a(this.el).show()},hide:function(){a(this.el).hide()},addMenu:function(e){var i={title:"",target:"",href:"",onclick:null,divider:!1,icon:null,cls:"button-menu btn-group"};i=t.merge(e,i),this.$menu||(a(this.el).append(this._templateMenu()),this.$menu=a(this.el).find(".menu"));var n=a(this._templateMenuItem(i));n.on("click",function(t){i.onclick&&(t.preventDefault(),i.onclick())}),this.$menu.append(n),i.divider&&this.$menu.append(a(this._templateDivider()))},_templateMenuItem:function(t){var e='",t.icon&&(e+=' '),e+=" "+t.title+" "},_templateMenu:function(){return''},_templateDivider:function(){return' '},_template:function(t){var e="",i="";t.title?e="width: auto;":i="margin: 0px;";var n=' ';return t.title&&(n+=' '+t.title+" "),n+="
"}});return{ButtonDefault:e,ButtonLink:i,ButtonIcon:s,ButtonCheck:n,ButtonMenu:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){var e=o.View.extend({row:null,row_count:0,optionsDefault:{content:"No content available.",onchange:null,ondblclick:null,onconfirm:null,cls:"ui-table",cls_tr:""},events:{click:"_onclick",dblclick:"_ondblclick"},initialize:function(e){this.options=t.merge(e,this.optionsDefault);var i=a(this._template(this.options));this.$thead=i.find("thead"),this.$tbody=i.find("tbody"),this.$tmessage=i.find("tmessage"),this.setElement(i),this.row=this._row()},addHeader:function(t){var e=a(" ");e.append(t),this.row.append(e)},appendHeader:function(){this.$thead.append(this.row),this.row=a(" ")},add:function(t,e,i){var n=a(" ");e&&n.css("width",e),i&&n.css("text-align",i),n.append(t),this.row.append(n)},append:function(t,e){this._commit(t,e,!1)},prepend:function(t,e){this._commit(t,e,!0)},get:function(t){return this.$el.find("#"+t)},del:function(t){var e=this.$tbody.find("#"+t);e.length>0&&(e.remove(),this.row_count--,this._refresh())},delAll:function(){this.$tbody.empty(),this.row_count=0,this._refresh()},value:function(t){this.before=this.$tbody.find(".current").attr("id"),void 0!==t&&(this.$tbody.find("tr").removeClass("current"),t&&this.$tbody.find("#"+t).addClass("current"));var e=this.$tbody.find(".current").attr("id");return void 0===e?null:(e!=this.before&&this.options.onchange&&this.options.onchange(t),e)},size:function(){return this.$tbody.find("tr").length},_commit:function(t,e,i){this.del(t),this.row.attr("id",t),i?this.$tbody.prepend(this.row):this.$tbody.append(this.row),e&&(this.row.hide(),this.row.fadeIn()),this.row=this._row(),this.row_count++,this._refresh()},_row:function(){return a(' ')},_onclick:function(t){var e=this.value(),i=a(t.target).closest("tr").attr("id");""!=i&&i&&e!=i&&(this.options.onconfirm?this.options.onconfirm(i):this.value(i))},_ondblclick:function(t){var e=this.value();e&&this.options.ondblclick&&this.options.ondblclick(e)},_refresh:function(){0==this.row_count?this.$tmessage.show():this.$tmessage.hide()},_template:function(t){return''+t.content+" "}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(i,o,a){n=[],s=function(){var t=i.Model.extend({defaults:{title:"",icon_class:"",on_click:null,menu_options:null,is_menu_button:!0,id:null,href:null,target:null,enabled:!0,visible:!0,tooltip_config:{}}}),e=i.View.extend({initialize:function(){this.model.attributes.tooltip_config={placement:"bottom"},this.model.bind("change",this.render,this)},render:function(){this.$el.tooltip("hide");var t=this.template(this.model.toJSON());return t.tooltip(this.model.get("tooltip_config")),this.$el.replaceWith(t),this.setElement(t),this},events:{click:"click"},click:function(t){return o.isFunction(this.model.get("on_click"))?(this.model.get("on_click")(t),!1):!0},template:function(t){var e='title="'+t.title+'" class="icon-button';return t.is_menu_button&&(e+=" menu-button"),e+=" "+t.icon_class,t.enabled||(e+="_disabled"),e+='"',t.id&&(e+=' id="'+t.id+'"'),e+=' href="'+t.href+'"',t.target&&(e+=' target="'+t.target+'"'),t.visible||(e+=' style="display: none;"'),e=t.enabled?"
":"
",a(e)}}),n=i.Collection.extend({model:t}),s=i.View.extend({tagName:"div",initialize:function(){this.render()},render:function(){var t=this;return this.collection.each(function(e){var i=a("
").attr("href","javascript:void(0)").attr("title",e.attributes.title).addClass("icon-button menu-button").addClass(e.attributes.icon_class).appendTo(t.$el).click(e.attributes.on_click);e.attributes.tooltip_config&&i.tooltip(e.attributes.tooltip_config);var n=e.get("options");n&&make_popupmenu(i,n)}),this}}),r=function(e,i){i||(i={});var a=new n(o.map(e,function(e){return new t(o.extend(e,i))}));return new s({collection:a})};return{IconButton:t,IconButtonView:e,IconButtonCollection:n,IconButtonMenuView:s,create_icon_buttons_menu:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s,o;!function(a){s=[i(1)],n=a,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(t){"use_strict";var e=t;e.fn.make_text_editable=function(t){var i="num_cols"in t?t.num_cols:30,n="num_rows"in t?t.num_rows:4,s="use_textarea"in t?t.use_textarea:!1,o="on_finish"in t?t.on_finish:null,a="help_text"in t?t.help_text:null,r=e(this);return r.addClass("editable-text").click(function(a){if(!(e(this).children(":input").length>0)){r.removeClass("editable-text");var l,c,d=function(t){r.find(":input").remove(),""!==t?r.text(t):r.html("
"),r.addClass("editable-text"),o&&o(t)},h="cur_text"in t?t.cur_text:r.text();s?(l=e("
").attr({rows:n,cols:i}).text(e.trim(h)).keyup(function(t){27===t.keyCode&&d(h)}),c=e("
").text("Done").click(function(){return d(l.val()),!1})):l=e("
").attr({value:e.trim(h),size:i}).blur(function(){d(h)}).keyup(function(t){27===t.keyCode?e(this).trigger("blur"):13===t.keyCode&&d(e(this).val()),t.stopPropagation()}),r.text(""),r.append(l),c&&r.append(c),l.focus(),l.select(),a.stopPropagation()}}),a&&r.attr("title",a).tooltip(),r}})},function(t,e,i){var n;(function(s,o){n=function(){function t(t){t+="";for(var e=/(\d+)(\d{3})/;e.test(t);)t=t.replace(e,"$1,$2");return t}var e=function(t){return"promise"in t},i=s.Model.extend({defaults:{ajax_settings:{},interval:1e3,success_fn:function(t){return!0}},go:function(){var t=o.Deferred(),e=this,i=e.get("ajax_settings"),n=e.get("success_fn"),s=e.get("interval"),a=function(){o.ajax(i).success(function(e){n(e)?t.resolve(e):setTimeout(a,s)})};return a(),t}}),n=function(t){t||(t="#ffffff"),"string"==typeof t&&(t=[t]);for(var e=0;e
>16,s=(65280&i)>>8,o=255&i,d=p(n,s,o),f=!0,e=0;e>16,l=(65280&a)>>8,c=255&a,h=p(r,l,c),u=g(n,s,o,r,l,c),Math.abs(d-h)<40||200>u){f=!1;break}m++}while(!f&&10>=m);return"#"+(16777216+i).toString(16).substr(1,6)};return{commatize:t,is_deferred:e,ServerStateDeferred:i,get_random_color:n}}.call(e,i,e,t),!(void 0!==n&&(t.exports=n))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(27),i(6),i(5)],s=function(t,e,i){t=t||window.BibtexParser;var n="citation",s=o.Model.extend(e.LoggableMixin).extend({_logNamespace:n,defaults:{content:""},initialize:function(){var e;try{e=t(this.attributes.content)}catch(i){return}if(e.errors.length){var n=e.errors.reduce(function(t,e){return t+"; "+e});this.log("Error parsing bibtex: "+n)}if(this._fields={},this.entry=a.first(e.entries),this.entry){var s=this.entry.Fields;for(var o in s){var r=s[o],l=o.toLowerCase();this._fields[l]=r}}},entryType:function(){return this.entry?this.entry.EntryType:void 0},fields:function(){return this._fields}}),r=o.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,urlRoot:Galaxy.root+"api",partial:!0,model:s}),l=r.extend({url:function(){return this.urlRoot+"/histories/"+this.history_id+"/citations"}}),c=r.extend({url:function(){return this.urlRoot+"/tools/"+this.tool_id+"/citations"},partial:!1});return{Citation:s,HistoryCitationCollection:l,ToolCitationCollection:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(4),i(7),i(43)],s=function(t,e,i){var n=i.extend({initialize:function(n){var s=this;i.prototype.initialize.call(this,t.merge({customize:function(t){t.buttons={execute:execute_btn=new e.Button({icon:"fa-check",tooltip:"Execute: "+t.name+" ("+t.version+")",title:"Execute",cls:"ui-button btn btn-primary",floating:"clear",onclick:function(){execute_btn.wait(),s.portlet.disable(),s.submit(t,function(){execute_btn.unwait(),s.portlet.enable()})}})},t.job_id&&t.job_remap&&(t.inputs.rerun_remap_job_id={label:"Resume dependencies from this job",name:"rerun_remap_job_id",type:"select",display:"radio",ignore:"__ignore__",value:"__ignore__",options:[["Yes",t.job_id],["No","__ignore__"]],help:"The previous run of this tool failed and other tools were waiting for it to finish successfully. Use this option to resume those tools using the new output(s) of this tool run."})}},n))},submit:function(e,i){var n=this,s={tool_id:e.id,tool_version:e.version,inputs:this.data.create()};if(this.trigger("reset"),!n.validate(s))return Galaxy.emit.debug("tool-form::submit()","Submission canceled. Validation failed."),void(i&&i());if(e.action!==Galaxy.root+"tool_runner/index"){var r=o("").attr({action:e.action,method:e.method,enctype:e.enctype});return a.each(s.inputs,function(t,e){r.append(o(" ").attr({name:e,value:t}))}),r.hide().appendTo("body").submit().remove(),void(i&&i())}Galaxy.emit.debug("tool-form::submit()","Validation complete.",s),t.request({type:"POST",url:Galaxy.root+"api/tools",data:s,success:function(t){i&&i(),n.$el.empty().append(n._templateSuccess(t)),parent.Galaxy&&parent.Galaxy.currHistoryPanel&&parent.Galaxy.currHistoryPanel.refreshContents();
+},error:function(t){if(i&&i(),Galaxy.emit.debug("tool-form::submit","Submission failed.",t),t&&t.err_data){var e=n.data.matchResponse(t.err_data);for(var o in e){n.highlight(o,e[o]);break}}else{var a=parent.Galaxy.modal;a&&a.show({title:"Job submission failed",body:t&&t.err_msg||n._templateError(s),buttons:{Close:function(){a.hide()}}})}}})},validate:function(t){var e=t.inputs,i=-1,n=null;for(var s in e){var o=e[s],a=this.data.match(s),r=this.field_list[a],l=this.input_list[a];if(a&&l&&r){if(!l.optional&&null==o)return this.highlight(a),!1;if(o&&o.batch){var c=o.values.length,d=c>0&&o.values[0]&&o.values[0].src;if(d)if(null===n)n=d;else if(n!==d)return this.highlight(a,"Please select either dataset or dataset list fields for all batch mode fields."),!1;if(-1===i)i=c;else if(i!==c)return this.highlight(a,"Please make sure that you select the same number of inputs for all batch mode fields. This field contains "+c+" selection(s) while a previous field contains "+i+" ."),!1}}else Galaxy.emit.debug("tool-form::validate()","Retrieving input objects failed.")}return!0},_templateSuccess:function(t){if(t.jobs&&t.jobs.length>0){var e=t.jobs.length,i=1==e?"1 job has":e+" jobs have",n=o("
").addClass("donemessagelarge").append(o("
").text(i+" been successfully added to the queue - resulting in the following datasets:"));return a.each(t.outputs,function(t){n.append(o("
").addClass("messagerow").append(o(" ").text(t.hid+": "+t.name)))}),n.append(o("
").append(" ").text("You can check the status of queued jobs and view the resulting data by refreshing the History pane. When the job has been run the status will change from 'running' to 'finished' if completed successfully or 'error' if problems were encountered.")),n}return this._templateError(t)},_templateError:function(t){return o("
").addClass("errormessagelarge").append(o("
").text("The server could not complete the request. Please contact the Galaxy Team if this error persists.")).append(o(" ").text(JSON.stringify(t,null,4)))}});return{View:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(4),i(9),i(7)],s=function(t,e,i){var n=o.View.extend({initialize:function(t){var n=this;this.options=t,this.name=t.name||"element",this.multiple=t.multiple||!1,this.message=new i.Message,this.portlet=new e.View({cls:"ui-portlet-section"}),this.select=new i.Select.View({optional:t.optional}),this.button=new i.ButtonIcon({icon:"fa fa-sign-in",floating:"left",tooltip:"Insert new "+this.name,onclick:function(){n.add({id:n.select.value(),name:n.select.text()})}}),this.setElement(this._template(t)),this.$(".ui-list-message").append(this.message.$el),this.$(".ui-list-portlet").append(this.portlet.$el),this.$(".ui-list-button").append(this.button.$el),this.$(".ui-list-select").append(this.select.$el)},value:function(t){if(void 0!==t){if(this.portlet.empty(),a.isArray(t))for(var e in t){var i=t[e],n=null,s=null;"string"!=a.type(i)?(n=i.id,s=i.name):n=s=i,null!=n&&this.add({id:n,name:s})}this._refresh()}var o=[];return this.$(".ui-list-id").each(function(){o.push({id:a(this).prop("id"),name:a(this).find(".ui-list-name").html()})}),0==o.length?null:o},add:function(e){var i=this;if(0===this.$('[id="'+e.id+'"]').length)if(t.isEmpty(e.id))this.message.update({message:"Please select a valid "+this.name+".",status:"danger"});else{var n=a(this._templateRow({id:e.id,name:e.name}));n.on("click",function(){n.remove(),i._refresh()}),n.on("mouseover",function(){n.addClass("portlet-highlight")}),n.on("mouseout",function(){n.removeClass("portlet-highlight")}),this.portlet.append(n),this._refresh()}else this.message.update({message:"This "+this.name+" is already in the list."})},update:function(t){this.select.update(t)},_refresh:function(){this.$(".ui-list-id").length>0?(!this.multiple&&this.button.disable(),this.$(".ui-list-portlet").show()):(this.button.enable(),this.$(".ui-list-portlet").hide()),this.options.onchange&&this.options.onchange()},_template:function(t){return''},_templateRow:function(t){return''+t.name+"
"}});return{View:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(13)],s=function(t,e){var i=o.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new o.Model({visible:!0,data:[],id:t.uid(),error_text:"No options available.",wait_text:"Please wait...",multiple:!1,optional:!1,onchange:function(){}}).set(e),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:visible",this._changeVisible,this),this.on("change",function(){i.model.get("onchange")(i.value())}),this.render()},render:function(){var t=this;this.$el.empty().removeClass().addClass("ui-options").append(this.$message=a("
")).append(this.$menu=a("
").addClass("ui-options-menu")).append(this.$options=a(this._template())),this.all_button=null,this.model.get("multiple")&&(this.all_button=new e.ButtonCheck({onclick:function(){t.$("input").prop("checked",0!==t.all_button.value()),t.value(t._getValue()),t.trigger("change")}}),this.$menu.append(this.all_button.$el)),this._changeData(),this._changeWait(),this._changeVisible()},_changeData:function(){var t=this;this.$options.empty(),this._templateOptions?this.$options.append(this._templateOptions(this.model.get("data"))):r.each(this.model.get("data"),function(e){t.$options.append(a(t._templateOption(e)).addClass("ui-option").tooltip({title:e.tooltip,placement:"bottom"}))});var t=this;this.$("input").on("change",function(){t.value(t._getValue()),t.trigger("change")}),this._changeValue(),this._changeWait()},_changeVisible:function(){this.$el[this.model.get("visible")?"show":"hide"]()},_changeWait:function(){this.model.get("wait")?0===this.length()&&(this._messageShow(this.model.get("wait_text"),"info"),this.$options.hide(),this.$menu.hide()):0===this.length()?(this._messageShow(this.model.get("error_text"),"danger"),this.$options.hide(),this.$menu.hide()):(this.$message.hide(),this.$options.css("display","inline-block"),this.$menu.show())},_changeValue:function(){this._setValue(this.model.get("value")),null!==this._getValue()||this.model.get("multiple")||this.model.get("optional")||this._setValue(this.first()),this.all_button&&this.all_button.value(a.isArray(this._getValue())?this._getValue().length:0,this.length())},value:function(t){return void 0!==t&&this.model.set("value",t),this._getValue()},first:function(){var t=this.$("input").first();return t.length>0?t.val():null},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},length:function(){return this.$(".ui-option").length},_setValue:function(t){var e=this;if(void 0!==t&&(this.$("input").prop("checked",!1),null!==t)){var i=a.isArray(t)?t:[t];r.each(i,function(t){e.$('input[value="'+t+'"]').first().prop("checked",!0)})}},_getValue:function(){var e=[];return this.$(":checked").each(function(){e.push(a(this).val())}),t.isEmpty(e)?null:this.model.get("multiple")?e:e[0]},_messageShow:function(t,e){this.$message.show().removeClass().addClass("ui-message alert alert-"+e).html(t)},_template:function(){return a("
").addClass("ui-options-list")}}),n=i.extend({_templateOption:function(e){var i=t.uid();return a("
").addClass("ui-option").append(a(" ").attr({id:i,type:this.model.get("type"),name:this.model.id,value:e.value})).append(a(" ").addClass("ui-options-label").attr("for",i).html(e.label))}}),s={};s.View=n.extend({initialize:function(t){t.type="radio",n.prototype.initialize.call(this,t)}});var l={};l.View=n.extend({initialize:function(t){t.type="checkbox",t.multiple=!0,n.prototype.initialize.call(this,t)}});var c={};return c.View=i.extend({initialize:function(t){i.prototype.initialize.call(this,t)},_setValue:function(t){void 0!==t&&(this.$("input").prop("checked",!1),this.$("label").removeClass("active"),this.$('[value="'+t+'"]').prop("checked",!0).closest("label").addClass("active"))},_templateOption:function(t){var e=a(" ").addClass("btn btn-default");return t.icon&&e.append(a(" ").addClass("fa").addClass(t.icon).addClass(!t.label&&"no-padding")),e.append(a(" ").attr({type:"radio",name:this.model.id,value:t.value})),t.label&&e.append(t.label),e},_template:function(){return a("
").addClass("btn-group ui-radiobutton").attr("data-toggle","buttons")}}),{Base:i,BaseIcons:n,Radio:s,RadioButton:c,Checkbox:l}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(13)],s=function(t,e){var i=o.View.extend({initialize:function(e){var i=this;this.model=e&&e.model||new o.Model({id:t.uid(),cls:"ui-select",error_text:"No options available",empty_text:"Nothing selected",visible:!0,wait:!1,multiple:!1,searchable:!0,optional:!1,disabled:!1,onchange:function(){}}).set(e),this.on("change",function(){i.model.get("onchange")(i.value())}),this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:disabled",this._changeDisabled,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:visible",this._changeVisible,this),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:multiple change:searchable change:cls change:id",this.render,this),this.render()},render:function(){var t=this;this.$el.empty().append(this.$select=a(" ")).append(this.$dropdown=a("
")).append(this.$resize=a("
").append(this.$resize_icon=a(" "))),this.$el.addClass(this.model.get("cls")).attr("id",this.model.get("id")),this.$select.addClass("select").attr("id",this.model.get("id")+"_select").prop("multiple",this.model.get("multiple")).on("change",function(){t.value(t._getValue()),t.trigger("change")}),this.$dropdown.hide(),this.model.get("multiple")||this.$dropdown.show().on("click",function(){t.$select.select2&&t.$select.select2("open")}),this.$resize.hide(),this.model.get("multiple")&&!this.model.get("searchable")&&(this.$resize_icon.addClass("fa fa-angle-double-right fa-rotate-45"),this.$resize.show().removeClass().addClass("icon-resize").off("mousedown").on("mousedown",function(e){var i=e.pageY,n=t.$select.height();t.minHeight=t.minHeight||n,a("#dd-helper").show().on("mousemove",function(e){t.$select.height(Math.max(n+(e.pageY-i),t.minHeight))}).on("mouseup mouseleave",function(){a("#dd-helper").hide().off()})})),this.all_button=null,this.model.get("multiple")&&(this.model.get("searchable")?(this.all_button=new e.ButtonCheck({onclick:function(){var e=[];0!==t.all_button.value()&&r.each(t.model.get("data"),function(t){e.push(t.value)}),t.value(e),t.trigger("change")}}),this.$el.prepend(this.all_button.$el)):this.$el.addClass("ui-select-multiple")),this._changeData(),this._changeWait(),this._changeVisible()},_changeData:function(){var t=this;this.$select.find("option").remove(),!this.model.get("multiple")&&this.model.get("optional")&&this.$select.append(this._templateOption({value:"__null__",label:t.model.get("empty_text")})),r.each(this.model.get("data"),function(e){t.$select.append(t._templateOption(e))}),0==this.length()?this.$select.prop("disabled",!0).append(this._templateOption({value:"__null__",label:this.model.get("error_text")})):this.$select.prop("disabled",!1),this.$select.select2("destroy"),this.model.get("searchable")&&(this.$select.select2({closeOnSelect:!this.model.get("multiple")}),this.$(".select2-container .select2-search input").off("blur")),this._changeValue()},_changeDisabled:function(){this.$select.prop("disabled",this.model.get("disabled"))},_changeWait:function(){this.$dropdown.removeClass().addClass("icon-dropdown fa").addClass(this.model.get("wait")?"fa-spinner fa-spin":"fa-caret-down")},_changeVisible:function(){this.$el[this.model.get("visible")?"show":"hide"](),this.$select[this.model.get("visible")?"show":"hide"]()},_changeValue:function(){this._setValue(this.model.get("value")),null!==this._getValue()||this.model.get("multiple")||this.model.get("optional")||this._setValue(this.first());var t=this._getValue();this.all_button&&this.all_button.value(a.isArray(t)?t.length:0,this.length())},value:function(t){return void 0!==t&&this.model.set("value",t),this._getValue()},first:function(){var t=this.$select.find("option").first();return t.length>0?t.val():null},exists:function(t){return this.$select.find('option[value="'+t+'"]').length>0},text:function(){return this.$select.find("option:selected").first().text()},show:function(){this.model.set("visible",!0)},hide:function(){this.model.set("visible",!1)},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},disabled:function(){return this.model.get("disabled")},enable:function(){this.model.set("disabled",!1)},disable:function(){this.model.set("disabled",!0)},add:function(t,e){r.each(this.model.get("data"),function(e){!r.findWhere(t,e)&&t.push(e)}),e&&t&&t.sort(e),this.model.set("data",t)},update:function(t){this.model.set("data",t)},setOnChange:function(t){this.model.set("onchange",t)},length:function(){return a.isArray(this.model.get("data"))?this.model.get("data").length:0},_setValue:function(t){void 0!==t&&(t=null!==t?t:"__null__",this.$select.val(t),this.$select.select2&&this.$select.select2("val",t))},_getValue:function(){var e=this.$select.val();return t.isEmpty(e)?null:e},_templateOption:function(t){return a(" ").attr("value",t.value).html(r.escape(t.label))}});return{View:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s,o;(function(i,a){!function(i,a){s=[],n=a,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(this,function(){var t=function(t){t=t||{},t.tooltipConfig=t.tooltipConfig||{placement:"bottom"},t.classes=["icon-btn"].concat(t.classes||[]),t.disabled&&t.classes.push("disabled");var e=['',' '," "].join(""),n=i(e).tooltip(t.tooltipConfig);return a.isFunction(t.onclick)&&n.click(t.onclick),n};return t})}).call(e,i(1),i(2))},,function(t,e,i){var n,s;(function(o,a,r){n=[i(4)],s=function(t){var e=o.View.extend({optionsDefault:{with_close:!0,title:null,placement:"top",container:"body",body:null},initialize:function(e){this.setElement(this._template()),this.uid=t.uid(),this.options=a.defaults(e||{},this.optionsDefault),this.options.container.parent().append(this.el),this.$title=this.$(".popover-title-label"),this.$close=this.$(".popover-close"),this.$body=this.$(".popover-content"),this.options.body&&this.append(this.options.body);var i=this;r("body").on("mousedown."+this.uid,function(t){i.visible&&!r(i.options.container).is(t.target)&&!r(i.el).is(t.target)&&0===r(i.el).has(t.target).length&&i.hide()})},render:function(){this.$title.html(this.options.title),this.$el.removeClass().addClass("ui-popover popover fade in").addClass(this.options.placement),this.$el.css(this._get_placement(this.options.placement));var t=this;this.options.with_close?this.$close.on("click",function(){t.hide()}).show():this.$close.off().hide()},title:function(t){void 0!==t&&(this.options.title=t,this.$title.html(t))},show:function(){this.render(),this.$el.show(),this.visible=!0},hide:function(){this.$el.hide(),this.visible=!1},append:function(t){this.$body.append(t)},empty:function(){this.$body.empty()},remove:function(){r("body").off("mousedown."+this.uid),this.$el.remove()},_get_placement:function(t){var e=this._get_width(this.$el),i=this.$el.height(),n=this.options.container,s=this._get_width(n),o=this._get_height(n),a=n.position(),r=left=0;if(-1!=["top","bottom"].indexOf(t))switch(left=a.left-e+(s+e)/2,t){case"top":r=a.top-i-5;break;case"bottom":r=a.top+o+5}else switch(r=a.top-i+(o+i)/2,t){case"right":left=a.left+s}return{top:r,left:left}},_get_width:function(t){return t.width()+parseInt(t.css("padding-left"))+parseInt(t.css("margin-left"))+parseInt(t.css("padding-right"))+parseInt(t.css("margin-right"))},_get_height:function(t){return t.height()+parseInt(t.css("padding-top"))+parseInt(t.css("padding-bottom"))},_template:function(t){return''}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){var e=o.View.extend({optionsDefault:{css:"",placeholder:"No data available",data:[],value:null,multiple:!1,minimumInputLength:0,initialData:""},initialize:function(e){if(this.options=t.merge(e,this.optionsDefault),this.setElement(this._template(this.options)),!this.options.container)return void console.log("ui-select::initialize() : container not specified.");if(this.options.container.append(this.$el),this.select_data=this.options.data,this._refresh(),!this.options.multiple){this.options.value&&this._setValue(this.options.value);var i=this;this.options.onchange&&this.$el.on("change",function(){i.options.onchange(i.value())})}},value:function(t){var e=this._getValue();void 0!==t&&this._setValue(t);var i=this._getValue();return i!=e&&this.options.onchange&&this.options.onchange(i),i},text:function(){return this.$el.select2("data").text},disabled:function(){return!this.$el.select2("enable")},enable:function(){this.$el.select2("enable",!0)},disable:function(){this.$el.select2("enable",!1)},add:function(t){this.select_data.push({id:t.id,text:t.text}),this._refresh()},del:function(t){var e=this._getIndex(t);-1!=e&&(this.select_data.splice(e,1),this._refresh())},remove:function(){this.$el.select2("destroy")},update:function(t){this.select_data=[];for(var e in t.data)this.select_data.push(t.data[e]);this._refresh()},_refresh:function(){if(this.options.multiple){var t={multiple:this.options.multiple,containerCssClass:this.options.css,placeholder:this.options.placeholder,minimumInputLength:this.options.minimumInputLength,ajax:this.options.ajax,dropdownCssClass:this.options.dropdownCssClass,escapeMarkup:this.options.escapeMarkup,formatResult:this.options.formatResult,formatSelection:this.options.formatSelection,initSelection:this.options.initSelection,initialData:this.options.initialData};this.$el.select2(t)}else{var e=this._getValue(),t={data:this.select_data,containerCssClass:this.options.css,placeholder:this.options.placeholder,dropdownAutoWidth:!0};this.$el.select2(t),this._setValue(e)}},_getIndex:function(t){a.findIndex(this.select_data,{id:t})},_getValue:function(){return this.$el.select2("val")},_setValue:function(t){var e=this._getIndex(t);-1==e&&this.select_data.length>0&&(t=this.select_data[0].id),this.$el.select2("val",t)},_template:function(t){return' '}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2))},function(t,e){function i(t){function e(t){s.push(t)}if("string"==typeof t){var n={},s=[],o=i.call(n,e);return o.parse(t),{entries:s,errors:o.getErrors()}}if("function"!=typeof t)throw"Invalid parser construction.";return this.STATES_={ENTRY_OR_JUNK:0,OBJECT_TYPE:1,ENTRY_KEY:2,KV_KEY:3,EQUALS:4,KV_VALUE:5},this.DATA_={},this.CALLBACK_=t,this.CHAR_=0,this.LINE_=1,this.CHAR_IN_LINE_=0,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.PARSETMP_={},this.SKIPTILLEOL_=!1,this.VALBRACES_=null,this.BRACETYPE_=null,this.BRACECOUNT_=0,this.STATE_=this.STATES_.ENTRY_OR_JUNK,this.ERRORS_=[],this.ENTRY_TYPES_={inproceedings:1,proceedings:2,article:3,techreport:4,misc:5,mastersthesis:6,book:7,phdthesis:8,incollection:9,unpublished:10,inbook:11,manual:12,periodical:13,booklet:14,masterthesis:15,conference:16,online:998,data:999},this.MACROS_={jan:"January",feb:"February",mar:"March",apr:"April",may:"May",jun:"June",jul:"July",aug:"August",sep:"September",oct:"October",nov:"November",dec:"December",Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"},this.getErrors=function(){return this.ERRORS_},this.parse=function(t){for(var e=0;en;n++){var l=i[n],c=!1;"\\"==l&&a-1>n?l=i[++n]:("{"==l||"}"==l)&&(c=!0),c||(r+=l)}t.Fields[e]=r}if("string"==t.ObjectType)for(var e in t.Fields)this.MACROS_[e]=t.Fields[e];else this.CALLBACK_(t)},this.processCharacter_=function(t){if(this.CHAR_++,this.CHAR_IN_LINE_++,"\n"==t&&(this.LINE_++,this.CHAR_IN_LINE_=1),this.SKIPTILLEOL_)return void("\n"==t&&(this.SKIPTILLEOL_=!1));if(this.SKIPCOMMENT_&&"%"==t)return void(this.SKIPTILLEOL_=!0);if(!this.SKIPWS_||!/\s/.test(t)){this.SKIPWS_=!1,this.SKIPCOMMENT_=!1,this.SKIPTILLEOL_=!1;for(var e=!0;e;)switch(e=!1,this.STATE_){case this.STATES_.ENTRY_OR_JUNK:"@"==t&&(this.STATE_=this.STATES_.OBJECT_TYPE,this.DATA_={ObjectType:""}),this.BRACETYPE_=null,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;break;case this.STATES_.OBJECT_TYPE:if(/[A-Za-z]/.test(t))this.DATA_.ObjectType+=t.toLowerCase(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;else{var i=this.DATA_.ObjectType;"comment"==i?this.STATE_=this.STATES_.ENTRY_OR_JUNK:"string"==i?(this.DATA_.ObjectType=i,this.DATA_.Fields={},this.BRACETYPE_=t,this.BRACECOUNT_=1,this.STATE_=this.STATES_.KV_KEY,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.PARSETMP_={Key:""}):"preamble"==i?this.STATE_=this.STATES_.ENTRY_OR_JUNK:i in this.ENTRY_TYPES_?(this.DATA_.ObjectType="entry",this.DATA_.EntryType=i,this.DATA_.EntryKey="",this.STATE_=this.STATES_.ENTRY_KEY,e=!0):(this.error_('Unrecognized object type: "'+this.DATA_.ObjectType+'"'),this.STATE_=this.STATES_.ENTRY_OR_JUNK)}break;case this.STATES_.ENTRY_KEY:if(("{"===t||"("===t)&&null==this.BRACETYPE_){this.BRACETYPE_=t,this.BRACECOUNT_=1,this.SKIPWS_=!0,this.SKIPCOMMENT_=!0;break}/[,%\s]/.test(t)?this.DATA_.EntryKey.length<1?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0):null==this.BRACETYPE_?(this.error_("No opening brace for object."),this.STATE_=this.STATES_.ENTRY_OR_JUNK):(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,e=!0,this.STATE_=this.STATES_.KV_KEY,this.PARSETMP_.Key="",this.DATA_.Fields={}):(this.DATA_.EntryKey+=t,this.SKIPWS_=!1,this.SKIPCOMMENT_=!1);break;case this.STATES_.KV_KEY:if("}"==t&&"{"==this.BRACETYPE_||")"==t&&"("==this.BRACETYPE_){this.processEntry_(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.ENTRY_OR_JUNK;break}/[\-A-Za-z:]/.test(t)?(this.PARSETMP_.Key+=t,this.SKIPWS_=!1,this.SKIPCOMMENT_=!1):this.PARSETMP_.Key.length<1?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0):(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.EQUALS,e=!0);break;case this.STATES_.EQUALS:if("}"==t&&"{"==this.BRACETYPE_||")"==t&&"("==this.BRACETYPE_){this.error_('Key-value pair has key "'+this.PARSETMP_.Key+'", but no value.'),this.processEntry_(),this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.ENTRY_OR_JUNK;break}"="==t&&(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_VALUE,this.PARSETMP_.Value="",this.VALBRACES_={'"':[],"{":[]});break;case this.STATES_.KV_VALUE:var n=this.VALBRACES_,s=this.PARSETMP_.Value,o=!1;if('"'==t||"{"==t||"}"==t||","==t){if(","==t&&0===n['"'].length+n["{"].length){var a=this.PARSETMP_.Value.trim();a in this.MACROS_?this.PARSETMP_.Value=this.MACROS_[a]:this.error_("Reference to an undefined macro: "+a),o=!0}if('"'==t){if(0===n['"'].length+n["{"].length){n['"'].push(this.CHAR_),this.SKIPWS_=!1,this.SKIPCOMMENT_=!1;break}1!=n['"'].length||0!=n["{"].length||0!=s.length&&"\\"==s[s.length-1]||(o=!0)}if("{"==t&&(0==s.length||"\\"!=s[s.length-1])&&(n["{"].push(this.CHAR_),this.SKIPWS_=!1,this.SKIPCOMMENT_=!1),"}"==t)if(0===n['"'].length+n["{"].length){var a=this.PARSETMP_.Value.trim();a in this.MACROS_?this.PARSETMP_.Value=this.MACROS_[a]:this.error_("Reference to an undefined macro: "+a),e=!0,o=!0}else(0==s.length||"\\"!=s[s.length-1])&&n["{"].length>0&&(n["{"].splice(n["{"].length-1,1),0==n["{"].length+n['"'].length&&(o=!0))}o?(this.SKIPWS_=!0,this.SKIPCOMMENT_=!0,this.STATE_=this.STATES_.KV_KEY,this.DATA_.Fields[this.PARSETMP_.Key]=this.PARSETMP_.Value,this.PARSETMP_={Key:""},this.VALBRACES_=null):this.PARSETMP_.Value+=t}}},this.CHARCONV_=[[/\\space /g," "],[/\\textdollar /g,"$"],[/\\textquotesingle /g,"'"],[/\\ast /g,"*"],[/\\textbackslash /g,"\\"],[/\\\^\{\}/g,"^"],[/\\textasciigrave /g,"`"],[/\\lbrace /g,"{"],[/\\vert /g,"|"],[/\\rbrace /g,"}"],[/\\textasciitilde /g,"~"],[/\\textexclamdown /g,"¡"],[/\\textcent /g,"¢"],[/\\textsterling /g,"£"],[/\\textcurrency /g,"¤"],[/\\textyen /g,"¥"],[/\\textbrokenbar /g,"¦"],[/\\textsection /g,"§"],[/\\textasciidieresis /g,"¨"],[/\\textcopyright /g,"©"],[/\\textordfeminine /g,"ª"],[/\\guillemotleft /g,"«"],[/\\lnot /g,"¬"],[/\\textregistered /g,"®"],[/\\textasciimacron /g,"¯"],[/\\textdegree /g,"°"],[/\\pm /g,"±"],[/\\textasciiacute /g,"´"],[/\\mathrm\{\\mu\}/g,"µ"],[/\\textparagraph /g,"¶"],[/\\cdot /g,"·"],[/\\c\{\}/g,"¸"],[/\\textordmasculine /g,"º"],[/\\guillemotright /g,"»"],[/\\textonequarter /g,"¼"],[/\\textonehalf /g,"½"],[/\\textthreequarters /g,"¾"],[/\\textquestiondown /g,"¿"],[/\\`\{A\}/g,"À"],[/\\'\{A\}/g,"Á"],[/\\\^\{A\}/g,"Â"],[/\\~\{A\}/g,"Ã"],[/\\"\{A\}/g,"Ä"],[/\\AA /g,"Å"],[/\\AE /g,"Æ"],[/\\c\{C\}/g,"Ç"],[/\\`\{E\}/g,"È"],[/\\'\{E\}/g,"É"],[/\\\^\{E\}/g,"Ê"],[/\\"\{E\}/g,"Ë"],[/\\`\{I\}/g,"Ì"],[/\\'\{I\}/g,"Í"],[/\\\^\{I\}/g,"Î"],[/\\"\{I\}/g,"Ï"],[/\\DH /g,"Ð"],[/\\~\{N\}/g,"Ñ"],[/\\`\{O\}/g,"Ò"],[/\\'\{O\}/g,"Ó"],[/\\\^\{O\}/g,"Ô"],[/\\~\{O\}/g,"Õ"],[/\\"\{O\}/g,"Ö"],[/\\texttimes /g,"×"],[/\\O /g,"Ø"],[/\\`\{U\}/g,"Ù"],[/\\'\{U\}/g,"Ú"],[/\\\^\{U\}/g,"Û"],[/\\"\{U\}/g,"Ü"],[/\\'\{Y\}/g,"Ý"],[/\\TH /g,"Þ"],[/\\ss /g,"ß"],[/\\`\{a\}/g,"à"],[/\\'\{a\}/g,"á"],[/\\\^\{a\}/g,"â"],[/\\~\{a\}/g,"ã"],[/\\"\{a\}/g,"ä"],[/\\aa /g,"å"],[/\\ae /g,"æ"],[/\\c\{c\}/g,"ç"],[/\\`\{e\}/g,"è"],[/\\'\{e\}/g,"é"],[/\\\^\{e\}/g,"ê"],[/\\"\{e\}/g,"ë"],[/\\`\{\\i\}/g,"ì"],[/\\'\{\\i\}/g,"í"],[/\\\^\{\\i\}/g,"î"],[/\\"\{\\i\}/g,"ï"],[/\\dh /g,"ð"],[/\\~\{n\}/g,"ñ"],[/\\`\{o\}/g,"ò"],[/\\'\{o\}/g,"ó"],[/\\\^\{o\}/g,"ô"],[/\\~\{o\}/g,"õ"],[/\\"\{o\}/g,"ö"],[/\\div /g,"÷"],[/\\o /g,"ø"],[/\\`\{u\}/g,"ù"],[/\\'\{u\}/g,"ú"],[/\\\^\{u\}/g,"û"],[/\\"\{u\}/g,"ü"],[/\\'\{y\}/g,"ý"],[/\\th /g,"þ"],[/\\"\{y\}/g,"ÿ"],[/\\=\{A\}/g,"Ā"],[/\\=\{a\}/g,"ā"],[/\\u\{A\}/g,"Ă"],[/\\u\{a\}/g,"ă"],[/\\k\{A\}/g,"Ą"],[/\\k\{a\}/g,"ą"],[/\\'\{C\}/g,"Ć"],[/\\'\{c\}/g,"ć"],[/\\\^\{C\}/g,"Ĉ"],[/\\\^\{c\}/g,"ĉ"],[/\\.\{C\}/g,"Ċ"],[/\\.\{c\}/g,"ċ"],[/\\v\{C\}/g,"Č"],[/\\v\{c\}/g,"č"],[/\\v\{D\}/g,"Ď"],[/\\v\{d\}/g,"ď"],[/\\DJ /g,"Đ"],[/\\dj /g,"đ"],[/\\=\{E\}/g,"Ē"],[/\\=\{e\}/g,"ē"],[/\\u\{E\}/g,"Ĕ"],[/\\u\{e\}/g,"ĕ"],[/\\.\{E\}/g,"Ė"],[/\\.\{e\}/g,"ė"],[/\\k\{E\}/g,"Ę"],[/\\k\{e\}/g,"ę"],[/\\v\{E\}/g,"Ě"],[/\\v\{e\}/g,"ě"],[/\\\^\{G\}/g,"Ĝ"],[/\\\^\{g\}/g,"ĝ"],[/\\u\{G\}/g,"Ğ"],[/\\u\{g\}/g,"ğ"],[/\\.\{G\}/g,"Ġ"],[/\\.\{g\}/g,"ġ"],[/\\c\{G\}/g,"Ģ"],[/\\c\{g\}/g,"ģ"],[/\\\^\{H\}/g,"Ĥ"],[/\\\^\{h\}/g,"ĥ"],[/\\Elzxh /g,"ħ"],[/\\~\{I\}/g,"Ĩ"],[/\\~\{\\i\}/g,"ĩ"],[/\\=\{I\}/g,"Ī"],[/\\=\{\\i\}/g,"ī"],[/\\u\{I\}/g,"Ĭ"],[/\\u\{\\i\}/g,"ĭ"],[/\\k\{I\}/g,"Į"],[/\\k\{i\}/g,"į"],[/\\.\{I\}/g,"İ"],[/\\i /g,"ı"],[/\\\^\{J\}/g,"Ĵ"],[/\\\^\{\\j\}/g,"ĵ"],[/\\c\{K\}/g,"Ķ"],[/\\c\{k\}/g,"ķ"],[/\\'\{L\}/g,"Ĺ"],[/\\'\{l\}/g,"ĺ"],[/\\c\{L\}/g,"Ļ"],[/\\c\{l\}/g,"ļ"],[/\\v\{L\}/g,"Ľ"],[/\\v\{l\}/g,"ľ"],[/\\L /g,"Ł"],[/\\l /g,"ł"],[/\\'\{N\}/g,"Ń"],[/\\'\{n\}/g,"ń"],[/\\c\{N\}/g,"Ņ"],[/\\c\{n\}/g,"ņ"],[/\\v\{N\}/g,"Ň"],[/\\v\{n\}/g,"ň"],[/\\NG /g,"Ŋ"],[/\\ng /g,"ŋ"],[/\\=\{O\}/g,"Ō"],[/\\=\{o\}/g,"ō"],[/\\u\{O\}/g,"Ŏ"],[/\\u\{o\}/g,"ŏ"],[/\\H\{O\}/g,"Ő"],[/\\H\{o\}/g,"ő"],[/\\OE /g,"Œ"],[/\\oe /g,"œ"],[/\\'\{R\}/g,"Ŕ"],[/\\'\{r\}/g,"ŕ"],[/\\c\{R\}/g,"Ŗ"],[/\\c\{r\}/g,"ŗ"],[/\\v\{R\}/g,"Ř"],[/\\v\{r\}/g,"ř"],[/\\'\{S\}/g,"Ś"],[/\\'\{s\}/g,"ś"],[/\\\^\{S\}/g,"Ŝ"],[/\\\^\{s\}/g,"ŝ"],[/\\c\{S\}/g,"Ş"],[/\\c\{s\}/g,"ş"],[/\\v\{S\}/g,"Š"],[/\\v\{s\}/g,"š"],[/\\c\{T\}/g,"Ţ"],[/\\c\{t\}/g,"ţ"],[/\\v\{T\}/g,"Ť"],[/\\v\{t\}/g,"ť"],[/\\~\{U\}/g,"Ũ"],[/\\~\{u\}/g,"ũ"],[/\\=\{U\}/g,"Ū"],[/\\=\{u\}/g,"ū"],[/\\u\{U\}/g,"Ŭ"],[/\\u\{u\}/g,"ŭ"],[/\\r\{U\}/g,"Ů"],[/\\r\{u\}/g,"ů"],[/\\H\{U\}/g,"Ű"],[/\\H\{u\}/g,"ű"],[/\\k\{U\}/g,"Ų"],[/\\k\{u\}/g,"ų"],[/\\\^\{W\}/g,"Ŵ"],[/\\\^\{w\}/g,"ŵ"],[/\\\^\{Y\}/g,"Ŷ"],[/\\\^\{y\}/g,"ŷ"],[/\\"\{Y\}/g,"Ÿ"],[/\\'\{Z\}/g,"Ź"],[/\\'\{z\}/g,"ź"],[/\\.\{Z\}/g,"Ż"],[/\\.\{z\}/g,"ż"],[/\\v\{Z\}/g,"Ž"],[/\\v\{z\}/g,"ž"],[/\\texthvlig /g,"ƕ"],[/\\textnrleg /g,"ƞ"],[/\\eth /g,"ƪ"],[/\\textdoublepipe /g,"ǂ"],[/\\'\{g\}/g,"ǵ"],[/\\Elztrna /g,"ɐ"],[/\\Elztrnsa /g,"ɒ"],[/\\Elzopeno /g,"ɔ"],[/\\Elzrtld /g,"ɖ"],[/\\Elzschwa /g,"ə"],[/\\varepsilon /g,"ɛ"],[/\\Elzpgamma /g,"ɣ"],[/\\Elzpbgam /g,"ɤ"],[/\\Elztrnh /g,"ɥ"],[/\\Elzbtdl /g,"ɬ"],[/\\Elzrtll /g,"ɭ"],[/\\Elztrnm /g,"ɯ"],[/\\Elztrnmlr /g,"ɰ"],[/\\Elzltlmr /g,"ɱ"],[/\\Elzltln /g,"ɲ"],[/\\Elzrtln /g,"ɳ"],[/\\Elzclomeg /g,"ɷ"],[/\\textphi /g,"ɸ"],[/\\Elztrnr /g,"ɹ"],[/\\Elztrnrl /g,"ɺ"],[/\\Elzrttrnr /g,"ɻ"],[/\\Elzrl /g,"ɼ"],[/\\Elzrtlr /g,"ɽ"],[/\\Elzfhr /g,"ɾ"],[/\\Elzrtls /g,"ʂ"],[/\\Elzesh /g,"ʃ"],[/\\Elztrnt /g,"ʇ"],[/\\Elzrtlt /g,"ʈ"],[/\\Elzpupsil /g,"ʊ"],[/\\Elzpscrv /g,"ʋ"],[/\\Elzinvv /g,"ʌ"],[/\\Elzinvw /g,"ʍ"],[/\\Elztrny /g,"ʎ"],[/\\Elzrtlz /g,"ʐ"],[/\\Elzyogh /g,"ʒ"],[/\\Elzglst /g,"ʔ"],[/\\Elzreglst /g,"ʕ"],[/\\Elzinglst /g,"ʖ"],[/\\textturnk /g,"ʞ"],[/\\Elzdyogh /g,"ʤ"],[/\\Elztesh /g,"ʧ"],[/\\textasciicaron /g,"ˇ"],[/\\Elzverts /g,"ˈ"],[/\\Elzverti /g,"ˌ"],[/\\Elzlmrk /g,"ː"],[/\\Elzhlmrk /g,"ˑ"],[/\\Elzsbrhr /g,"˒"],[/\\Elzsblhr /g,"˓"],[/\\Elzrais /g,"˔"],[/\\Elzlow /g,"˕"],[/\\textasciibreve /g,"˘"],[/\\textperiodcentered /g,"˙"],[/\\r\{\}/g,"˚"],[/\\k\{\}/g,"˛"],[/\\texttildelow /g,"˜"],[/\\H\{\}/g,"˝"],[/\\tone\{55\}/g,"˥"],[/\\tone\{44\}/g,"˦"],[/\\tone\{33\}/g,"˧"],[/\\tone\{22\}/g,"˨"],[/\\tone\{11\}/g,"˩"],[/\\cyrchar\\C/g,"̏"],[/\\Elzpalh /g,"̡"],[/\\Elzrh /g,"̢"],[/\\Elzsbbrg /g,"̪"],[/\\Elzxl /g,"̵"],[/\\Elzbar /g,"̶"],[/\\'\{A\}/g,"Ά"],[/\\'\{E\}/g,"Έ"],[/\\'\{H\}/g,"Ή"],[/\\'\{\}\{I\}/g,"Ί"],[/\\'\{\}O/g,"Ό"],[/\\mathrm\{'Y\}/g,"Ύ"],[/\\mathrm\{'\\Omega\}/g,"Ώ"],[/\\acute\{\\ddot\{\\iota\}\}/g,"ΐ"],[/\\Alpha /g,"Α"],[/\\Beta /g,"Β"],[/\\Gamma /g,"Γ"],[/\\Delta /g,"Δ"],[/\\Epsilon /g,"Ε"],[/\\Zeta /g,"Ζ"],[/\\Eta /g,"Η"],[/\\Theta /g,"Θ"],[/\\Iota /g,"Ι"],[/\\Kappa /g,"Κ"],[/\\Lambda /g,"Λ"],[/\\Xi /g,"Ξ"],[/\\Pi /g,"Π"],[/\\Rho /g,"Ρ"],[/\\Sigma /g,"Σ"],[/\\Tau /g,"Τ"],[/\\Upsilon /g,"Υ"],[/\\Phi /g,"Φ"],[/\\Chi /g,"Χ"],[/\\Psi /g,"Ψ"],[/\\Omega /g,"Ω"],[/\\mathrm\{\\ddot\{I\}\}/g,"Ϊ"],[/\\mathrm\{\\ddot\{Y\}\}/g,"Ϋ"],[/\\'\{\$\\alpha\$\}/g,"ά"],[/\\acute\{\\epsilon\}/g,"έ"],[/\\acute\{\\eta\}/g,"ή"],[/\\acute\{\\iota\}/g,"ί"],[/\\acute\{\\ddot\{\\upsilon\}\}/g,"ΰ"],[/\\alpha /g,"α"],[/\\beta /g,"β"],[/\\gamma /g,"γ"],[/\\delta /g,"δ"],[/\\epsilon /g,"ε"],[/\\zeta /g,"ζ"],[/\\eta /g,"η"],[/\\texttheta /g,"θ"],[/\\iota /g,"ι"],[/\\kappa /g,"κ"],[/\\lambda /g,"λ"],[/\\mu /g,"μ"],[/\\nu /g,"ν"],[/\\xi /g,"ξ"],[/\\pi /g,"π"],[/\\rho /g,"ρ"],[/\\varsigma /g,"ς"],[/\\sigma /g,"σ"],[/\\tau /g,"τ"],[/\\upsilon /g,"υ"],[/\\varphi /g,"φ"],[/\\chi /g,"χ"],[/\\psi /g,"ψ"],[/\\omega /g,"ω"],[/\\ddot\{\\iota\}/g,"ϊ"],[/\\ddot\{\\upsilon\}/g,"ϋ"],[/\\'\{o\}/g,"ό"],[/\\acute\{\\upsilon\}/g,"ύ"],[/\\acute\{\\omega\}/g,"ώ"],[/\\Pisymbol\{ppi022\}\{87\}/g,"ϐ"],[/\\textvartheta /g,"ϑ"],[/\\Upsilon /g,"ϒ"],[/\\phi /g,"ϕ"],[/\\varpi /g,"ϖ"],[/\\Stigma /g,"Ϛ"],[/\\Digamma /g,"Ϝ"],[/\\digamma /g,"ϝ"],[/\\Koppa /g,"Ϟ"],[/\\Sampi /g,"Ϡ"],[/\\varkappa /g,"ϰ"],[/\\varrho /g,"ϱ"],[/\\textTheta /g,"ϴ"],[/\\backepsilon /g,"϶"],[/\\cyrchar\\CYRYO /g,"Ё"],[/\\cyrchar\\CYRDJE /g,"Ђ"],[/\\cyrchar\{\\'\\CYRG\}/g,"Ѓ"],[/\\cyrchar\\CYRIE /g,"Є"],[/\\cyrchar\\CYRDZE /g,"Ѕ"],[/\\cyrchar\\CYRII /g,"І"],[/\\cyrchar\\CYRYI /g,"Ї"],[/\\cyrchar\\CYRJE /g,"Ј"],[/\\cyrchar\\CYRLJE /g,"Љ"],[/\\cyrchar\\CYRNJE /g,"Њ"],[/\\cyrchar\\CYRTSHE /g,"Ћ"],[/\\cyrchar\{\\'\\CYRK\}/g,"Ќ"],[/\\cyrchar\\CYRUSHRT /g,"Ў"],[/\\cyrchar\\CYRDZHE /g,"Џ"],[/\\cyrchar\\CYRA /g,"А"],[/\\cyrchar\\CYRB /g,"Б"],[/\\cyrchar\\CYRV /g,"В"],[/\\cyrchar\\CYRG /g,"Г"],[/\\cyrchar\\CYRD /g,"Д"],[/\\cyrchar\\CYRE /g,"Е"],[/\\cyrchar\\CYRZH /g,"Ж"],[/\\cyrchar\\CYRZ /g,"З"],[/\\cyrchar\\CYRI /g,"И"],[/\\cyrchar\\CYRISHRT /g,"Й"],[/\\cyrchar\\CYRK /g,"К"],[/\\cyrchar\\CYRL /g,"Л"],[/\\cyrchar\\CYRM /g,"М"],[/\\cyrchar\\CYRN /g,"Н"],[/\\cyrchar\\CYRO /g,"О"],[/\\cyrchar\\CYRP /g,"П"],[/\\cyrchar\\CYRR /g,"Р"],[/\\cyrchar\\CYRS /g,"С"],[/\\cyrchar\\CYRT /g,"Т"],[/\\cyrchar\\CYRU /g,"У"],[/\\cyrchar\\CYRF /g,"Ф"],[/\\cyrchar\\CYRH /g,"Х"],[/\\cyrchar\\CYRC /g,"Ц"],[/\\cyrchar\\CYRCH /g,"Ч"],[/\\cyrchar\\CYRSH /g,"Ш"],[/\\cyrchar\\CYRSHCH /g,"Щ"],[/\\cyrchar\\CYRHRDSN /g,"Ъ"],[/\\cyrchar\\CYRERY /g,"Ы"],[/\\cyrchar\\CYRSFTSN /g,"Ь"],[/\\cyrchar\\CYREREV /g,"Э"],[/\\cyrchar\\CYRYU /g,"Ю"],[/\\cyrchar\\CYRYA /g,"Я"],[/\\cyrchar\\cyra /g,"а"],[/\\cyrchar\\cyrb /g,"б"],[/\\cyrchar\\cyrv /g,"в"],[/\\cyrchar\\cyrg /g,"г"],[/\\cyrchar\\cyrd /g,"д"],[/\\cyrchar\\cyre /g,"е"],[/\\cyrchar\\cyrzh /g,"ж"],[/\\cyrchar\\cyrz /g,"з"],[/\\cyrchar\\cyri /g,"и"],[/\\cyrchar\\cyrishrt /g,"й"],[/\\cyrchar\\cyrk /g,"к"],[/\\cyrchar\\cyrl /g,"л"],[/\\cyrchar\\cyrm /g,"м"],[/\\cyrchar\\cyrn /g,"н"],[/\\cyrchar\\cyro /g,"о"],[/\\cyrchar\\cyrp /g,"п"],[/\\cyrchar\\cyrr /g,"р"],[/\\cyrchar\\cyrs /g,"с"],[/\\cyrchar\\cyrt /g,"т"],[/\\cyrchar\\cyru /g,"у"],[/\\cyrchar\\cyrf /g,"ф"],[/\\cyrchar\\cyrh /g,"х"],[/\\cyrchar\\cyrc /g,"ц"],[/\\cyrchar\\cyrch /g,"ч"],[/\\cyrchar\\cyrsh /g,"ш"],[/\\cyrchar\\cyrshch /g,"щ"],[/\\cyrchar\\cyrhrdsn /g,"ъ"],[/\\cyrchar\\cyrery /g,"ы"],[/\\cyrchar\\cyrsftsn /g,"ь"],[/\\cyrchar\\cyrerev /g,"э"],[/\\cyrchar\\cyryu /g,"ю"],[/\\cyrchar\\cyrya /g,"я"],[/\\cyrchar\\cyryo /g,"ё"],[/\\cyrchar\\cyrdje /g,"ђ"],[/\\cyrchar\{\\'\\cyrg\}/g,"ѓ"],[/\\cyrchar\\cyrie /g,"є"],[/\\cyrchar\\cyrdze /g,"ѕ"],[/\\cyrchar\\cyrii /g,"і"],[/\\cyrchar\\cyryi /g,"ї"],[/\\cyrchar\\cyrje /g,"ј"],[/\\cyrchar\\cyrlje /g,"љ"],[/\\cyrchar\\cyrnje /g,"њ"],[/\\cyrchar\\cyrtshe /g,"ћ"],[/\\cyrchar\{\\'\\cyrk\}/g,"ќ"],[/\\cyrchar\\cyrushrt /g,"ў"],[/\\cyrchar\\cyrdzhe /g,"џ"],[/\\cyrchar\\CYROMEGA /g,"Ѡ"],[/\\cyrchar\\cyromega /g,"ѡ"],[/\\cyrchar\\CYRYAT /g,"Ѣ"],[/\\cyrchar\\CYRIOTE /g,"Ѥ"],[/\\cyrchar\\cyriote /g,"ѥ"],[/\\cyrchar\\CYRLYUS /g,"Ѧ"],[/\\cyrchar\\cyrlyus /g,"ѧ"],[/\\cyrchar\\CYRIOTLYUS /g,"Ѩ"],[/\\cyrchar\\cyriotlyus /g,"ѩ"],[/\\cyrchar\\CYRBYUS /g,"Ѫ"],[/\\cyrchar\\CYRIOTBYUS /g,"Ѭ"],[/\\cyrchar\\cyriotbyus /g,"ѭ"],[/\\cyrchar\\CYRKSI /g,"Ѯ"],[/\\cyrchar\\cyrksi /g,"ѯ"],[/\\cyrchar\\CYRPSI /g,"Ѱ"],[/\\cyrchar\\cyrpsi /g,"ѱ"],[/\\cyrchar\\CYRFITA /g,"Ѳ"],[/\\cyrchar\\CYRIZH /g,"Ѵ"],[/\\cyrchar\\CYRUK /g,"Ѹ"],[/\\cyrchar\\cyruk /g,"ѹ"],[/\\cyrchar\\CYROMEGARND /g,"Ѻ"],[/\\cyrchar\\cyromegarnd /g,"ѻ"],[/\\cyrchar\\CYROMEGATITLO /g,"Ѽ"],[/\\cyrchar\\cyromegatitlo /g,"ѽ"],[/\\cyrchar\\CYROT /g,"Ѿ"],[/\\cyrchar\\cyrot /g,"ѿ"],[/\\cyrchar\\CYRKOPPA /g,"Ҁ"],[/\\cyrchar\\cyrkoppa /g,"ҁ"],[/\\cyrchar\\cyrthousands /g,"҂"],[/\\cyrchar\\cyrhundredthousands /g,"҈"],[/\\cyrchar\\cyrmillions /g,"҉"],[/\\cyrchar\\CYRSEMISFTSN /g,"Ҍ"],[/\\cyrchar\\cyrsemisftsn /g,"ҍ"],[/\\cyrchar\\CYRRTICK /g,"Ҏ"],[/\\cyrchar\\cyrrtick /g,"ҏ"],[/\\cyrchar\\CYRGUP /g,"Ґ"],[/\\cyrchar\\cyrgup /g,"ґ"],[/\\cyrchar\\CYRGHCRS /g,"Ғ"],[/\\cyrchar\\cyrghcrs /g,"ғ"],[/\\cyrchar\\CYRGHK /g,"Ҕ"],[/\\cyrchar\\cyrghk /g,"ҕ"],[/\\cyrchar\\CYRZHDSC /g,"Җ"],[/\\cyrchar\\cyrzhdsc /g,"җ"],[/\\cyrchar\\CYRZDSC /g,"Ҙ"],[/\\cyrchar\\cyrzdsc /g,"ҙ"],[/\\cyrchar\\CYRKDSC /g,"Қ"],[/\\cyrchar\\cyrkdsc /g,"қ"],[/\\cyrchar\\CYRKVCRS /g,"Ҝ"],[/\\cyrchar\\cyrkvcrs /g,"ҝ"],[/\\cyrchar\\CYRKHCRS /g,"Ҟ"],[/\\cyrchar\\cyrkhcrs /g,"ҟ"],[/\\cyrchar\\CYRKBEAK /g,"Ҡ"],[/\\cyrchar\\cyrkbeak /g,"ҡ"],[/\\cyrchar\\CYRNDSC /g,"Ң"],[/\\cyrchar\\cyrndsc /g,"ң"],[/\\cyrchar\\CYRNG /g,"Ҥ"],[/\\cyrchar\\cyrng /g,"ҥ"],[/\\cyrchar\\CYRPHK /g,"Ҧ"],[/\\cyrchar\\cyrphk /g,"ҧ"],[/\\cyrchar\\CYRABHHA /g,"Ҩ"],[/\\cyrchar\\cyrabhha /g,"ҩ"],[/\\cyrchar\\CYRSDSC /g,"Ҫ"],[/\\cyrchar\\cyrsdsc /g,"ҫ"],[/\\cyrchar\\CYRTDSC /g,"Ҭ"],[/\\cyrchar\\cyrtdsc /g,"ҭ"],[/\\cyrchar\\CYRY /g,"Ү"],[/\\cyrchar\\cyry /g,"ү"],[/\\cyrchar\\CYRYHCRS /g,"Ұ"],[/\\cyrchar\\cyryhcrs /g,"ұ"],[/\\cyrchar\\CYRHDSC /g,"Ҳ"],[/\\cyrchar\\cyrhdsc /g,"ҳ"],[/\\cyrchar\\CYRTETSE /g,"Ҵ"],[/\\cyrchar\\cyrtetse /g,"ҵ"],[/\\cyrchar\\CYRCHRDSC /g,"Ҷ"],[/\\cyrchar\\cyrchrdsc /g,"ҷ"],[/\\cyrchar\\CYRCHVCRS /g,"Ҹ"],[/\\cyrchar\\cyrchvcrs /g,"ҹ"],[/\\cyrchar\\CYRSHHA /g,"Һ"],[/\\cyrchar\\cyrshha /g,"һ"],[/\\cyrchar\\CYRABHCH /g,"Ҽ"],[/\\cyrchar\\cyrabhch /g,"ҽ"],[/\\cyrchar\\CYRABHCHDSC /g,"Ҿ"],[/\\cyrchar\\cyrabhchdsc /g,"ҿ"],[/\\cyrchar\\CYRpalochka /g,"Ӏ"],[/\\cyrchar\\CYRKHK /g,"Ӄ"],[/\\cyrchar\\cyrkhk /g,"ӄ"],[/\\cyrchar\\CYRNHK /g,"Ӈ"],[/\\cyrchar\\cyrnhk /g,"ӈ"],[/\\cyrchar\\CYRCHLDSC /g,"Ӌ"],[/\\cyrchar\\cyrchldsc /g,"ӌ"],[/\\cyrchar\\CYRAE /g,"Ӕ"],[/\\cyrchar\\cyrae /g,"ӕ"],[/\\cyrchar\\CYRSCHWA /g,"Ә"],[/\\cyrchar\\cyrschwa /g,"ә"],[/\\cyrchar\\CYRABHDZE /g,"Ӡ"],[/\\cyrchar\\cyrabhdze /g,"ӡ"],[/\\cyrchar\\CYROTLD /g,"Ө"],[/\\cyrchar\\cyrotld /g,"ө"],[/\\hspace\{0.6em\}/g," "],[/\\hspace\{1em\}/g," "],[/\\hspace\{0.33em\}/g," "],[/\\hspace\{0.25em\}/g," "],[/\\hspace\{0.166em\}/g," "],[/\\hphantom\{0\}/g," "],[/\\hphantom\{,\}/g," "],[/\\hspace\{0.167em\}/g," "],[/\\mkern1mu /g," "],[/\\textendash /g,"–"],[/\\textemdash /g,"—"],[/\\rule\{1em\}\{1pt\}/g,"―"],[/\\Vert /g,"‖"],[/\\Elzreapos /g,"‛"],[/\\textquotedblleft /g,"“"],[/\\textquotedblright /g,"”"],[/\\textdagger /g,"†"],[/\\textdaggerdbl /g,"‡"],[/\\textbullet /g,"•"],[/\\ldots /g,"…"],[/\\textperthousand /g,"‰"],[/\\textpertenthousand /g,"‱"],[/\\backprime /g,"‵"],[/\\guilsinglleft /g,"‹"],[/\\guilsinglright /g,"›"],[/\\mkern4mu /g," "],[/\\nolinebreak /g,""],[/\\ensuremath\{\\Elzpes\}/g,"₧"],[/\\mbox\{\\texteuro\} /g,"€"],[/\\dddot /g,"⃛"],[/\\ddddot /g,"⃜"],[/\\mathbb\{C\}/g,"ℂ"],[/\\mathscr\{g\}/g,"ℊ"],[/\\mathscr\{H\}/g,"ℋ"],[/\\mathfrak\{H\}/g,"ℌ"],[/\\mathbb\{H\}/g,"ℍ"],[/\\hslash /g,"ℏ"],[/\\mathscr\{I\}/g,"ℐ"],[/\\mathfrak\{I\}/g,"ℑ"],[/\\mathscr\{L\}/g,"ℒ"],[/\\mathscr\{l\}/g,"ℓ"],[/\\mathbb\{N\}/g,"ℕ"],[/\\cyrchar\\textnumero /g,"№"],[/\\wp /g,"℘"],[/\\mathbb\{P\}/g,"ℙ"],[/\\mathbb\{Q\}/g,"ℚ"],[/\\mathscr\{R\}/g,"ℛ"],[/\\mathfrak\{R\}/g,"ℜ"],[/\\mathbb\{R\}/g,"ℝ"],[/\\Elzxrat /g,"℞"],[/\\texttrademark /g,"™"],[/\\mathbb\{Z\}/g,"ℤ"],[/\\Omega /g,"Ω"],[/\\mho /g,"℧"],[/\\mathfrak\{Z\}/g,"ℨ"],[/\\ElsevierGlyph\{2129\}/g,"℩"],[/\\AA /g,"Å"],[/\\mathscr\{B\}/g,"ℬ"],[/\\mathfrak\{C\}/g,"ℭ"],[/\\mathscr\{e\}/g,"ℯ"],[/\\mathscr\{E\}/g,"ℰ"],[/\\mathscr\{F\}/g,"ℱ"],[/\\mathscr\{M\}/g,"ℳ"],[/\\mathscr\{o\}/g,"ℴ"],[/\\aleph /g,"ℵ"],[/\\beth /g,"ℶ"],[/\\gimel /g,"ℷ"],[/\\daleth /g,"ℸ"],[/\\textfrac\{1\}\{3\}/g,"⅓"],[/\\textfrac\{2\}\{3\}/g,"⅔"],[/\\textfrac\{1\}\{5\}/g,"⅕"],[/\\textfrac\{2\}\{5\}/g,"⅖"],[/\\textfrac\{3\}\{5\}/g,"⅗"],[/\\textfrac\{4\}\{5\}/g,"⅘"],[/\\textfrac\{1\}\{6\}/g,"⅙"],[/\\textfrac\{5\}\{6\}/g,"⅚"],[/\\textfrac\{1\}\{8\}/g,"⅛"],[/\\textfrac\{3\}\{8\}/g,"⅜"],[/\\textfrac\{5\}\{8\}/g,"⅝"],[/\\textfrac\{7\}\{8\}/g,"⅞"],[/\\leftarrow /g,"←"],[/\\uparrow /g,"↑"],[/\\rightarrow /g,"→"],[/\\downarrow /g,"↓"],[/\\leftrightarrow /g,"↔"],[/\\updownarrow /g,"↕"],[/\\nwarrow /g,"↖"],[/\\nearrow /g,"↗"],[/\\searrow /g,"↘"],[/\\swarrow /g,"↙"],[/\\nleftarrow /g,"↚"],[/\\nrightarrow /g,"↛"],[/\\arrowwaveright /g,"↜"],[/\\arrowwaveright /g,"↝"],[/\\twoheadleftarrow /g,"↞"],[/\\twoheadrightarrow /g,"↠"],[/\\leftarrowtail /g,"↢"],[/\\rightarrowtail /g,"↣"],[/\\mapsto /g,"↦"],[/\\hookleftarrow /g,"↩"],[/\\hookrightarrow /g,"↪"],[/\\looparrowleft /g,"↫"],[/\\looparrowright /g,"↬"],[/\\leftrightsquigarrow /g,"↭"],[/\\nleftrightarrow /g,"↮"],[/\\Lsh /g,"↰"],[/\\Rsh /g,"↱"],[/\\ElsevierGlyph\{21B3\}/g,"↳"],[/\\curvearrowleft /g,"↶"],[/\\curvearrowright /g,"↷"],[/\\circlearrowleft /g,"↺"],[/\\circlearrowright /g,"↻"],[/\\leftharpoonup /g,"↼"],[/\\leftharpoondown /g,"↽"],[/\\upharpoonright /g,"↾"],[/\\upharpoonleft /g,"↿"],[/\\rightharpoonup /g,"⇀"],[/\\rightharpoondown /g,"⇁"],[/\\downharpoonright /g,"⇂"],[/\\downharpoonleft /g,"⇃"],[/\\rightleftarrows /g,"⇄"],[/\\dblarrowupdown /g,"⇅"],[/\\leftrightarrows /g,"⇆"],[/\\leftleftarrows /g,"⇇"],[/\\upuparrows /g,"⇈"],[/\\rightrightarrows /g,"⇉"],[/\\downdownarrows /g,"⇊"],[/\\leftrightharpoons /g,"⇋"],[/\\rightleftharpoons /g,"⇌"],[/\\nLeftarrow /g,"⇍"],[/\\nLeftrightarrow /g,"⇎"],[/\\nRightarrow /g,"⇏"],[/\\Leftarrow /g,"⇐"],[/\\Uparrow /g,"⇑"],[/\\Rightarrow /g,"⇒"],[/\\Downarrow /g,"⇓"],[/\\Leftrightarrow /g,"⇔"],[/\\Updownarrow /g,"⇕"],[/\\Lleftarrow /g,"⇚"],[/\\Rrightarrow /g,"⇛"],[/\\rightsquigarrow /g,"⇝"],[/\\DownArrowUpArrow /g,"⇵"],[/\\forall /g,"∀"],[/\\complement /g,"∁"],[/\\partial /g,"∂"],[/\\exists /g,"∃"],[/\\nexists /g,"∄"],[/\\varnothing /g,"∅"],[/\\nabla /g,"∇"],[/\\in /g,"∈"],[/\\not\\in /g,"∉"],[/\\ni /g,"∋"],[/\\not\\ni /g,"∌"],[/\\prod /g,"∏"],[/\\coprod /g,"∐"],[/\\sum /g,"∑"],[/\\mp /g,"∓"],[/\\dotplus /g,"∔"],[/\\setminus /g,"∖"],[/\\circ /g,"∘"],[/\\bullet /g,"∙"],[/\\surd /g,"√"],[/\\propto /g,"∝"],[/\\infty /g,"∞"],[/\\rightangle /g,"∟"],[/\\angle /g,"∠"],[/\\measuredangle /g,"∡"],[/\\sphericalangle /g,"∢"],[/\\mid /g,"∣"],[/\\nmid /g,"∤"],[/\\parallel /g,"∥"],[/\\nparallel /g,"∦"],[/\\wedge /g,"∧"],[/\\vee /g,"∨"],[/\\cap /g,"∩"],[/\\cup /g,"∪"],[/\\int /g,"∫"],[/\\int\\!\\int /g,"∬"],[/\\int\\!\\int\\!\\int /g,"∭"],[/\\oint /g,"∮"],[/\\surfintegral /g,"∯"],[/\\volintegral /g,"∰"],[/\\clwintegral /g,"∱"],[/\\ElsevierGlyph\{2232\}/g,"∲"],[/\\ElsevierGlyph\{2233\}/g,"∳"],[/\\therefore /g,"∴"],[/\\because /g,"∵"],[/\\Colon /g,"∷"],[/\\ElsevierGlyph\{2238\}/g,"∸"],[/\\mathbin\{\{:\}\\!\\!\{\-\}\\!\\!\{:\}\}/g,"∺"],[/\\homothetic /g,"∻"],[/\\sim /g,"∼"],[/\\backsim /g,"∽"],[/\\lazysinv /g,"∾"],[/\\wr /g,"≀"],[/\\not\\sim /g,"≁"],[/\\ElsevierGlyph\{2242\}/g,"≂"],[/\\NotEqualTilde /g,"≂-00338"],[/\\simeq /g,"≃"],[/\\not\\simeq /g,"≄"],[/\\cong /g,"≅"],[/\\approxnotequal /g,"≆"],[/\\not\\cong /g,"≇"],[/\\approx /g,"≈"],[/\\not\\approx /g,"≉"],[/\\approxeq /g,"≊"],[/\\tildetrpl /g,"≋"],[/\\not\\apid /g,"≋-00338"],[/\\allequal /g,"≌"],[/\\asymp /g,"≍"],[/\\Bumpeq /g,"≎"],[/\\NotHumpDownHump /g,"≎-00338"],[/\\bumpeq /g,"≏"],[/\\NotHumpEqual /g,"≏-00338"],[/\\doteq /g,"≐"],[/\\not\\doteq/g,"≐-00338"],[/\\doteqdot /g,"≑"],[/\\fallingdotseq /g,"≒"],[/\\risingdotseq /g,"≓"],[/\\eqcirc /g,"≖"],[/\\circeq /g,"≗"],[/\\estimates /g,"≙"],[/\\ElsevierGlyph\{225A\}/g,"≚"],[/\\starequal /g,"≛"],[/\\triangleq /g,"≜"],[/\\ElsevierGlyph\{225F\}/g,"≟"],[/\\not =/g,"≠"],[/\\equiv /g,"≡"],[/\\not\\equiv /g,"≢"],[/\\leq /g,"≤"],[/\\geq /g,"≥"],[/\\leqq /g,"≦"],[/\\geqq /g,"≧"],[/\\lneqq /g,"≨"],[/\\lvertneqq /g,"≨-0FE00"],[/\\gneqq /g,"≩"],[/\\gvertneqq /g,"≩-0FE00"],[/\\ll /g,"≪"],[/\\NotLessLess /g,"≪-00338"],[/\\gg /g,"≫"],[/\\NotGreaterGreater /g,"≫-00338"],[/\\between /g,"≬"],[/\\not\\kern\-0.3em\\times /g,"≭"],[/\\not/g,"≯"],[/\\not\\leq /g,"≰"],[/\\not\\geq /g,"≱"],[/\\lessequivlnt /g,"≲"],[/\\greaterequivlnt /g,"≳"],[/\\ElsevierGlyph\{2274\}/g,"≴"],[/\\ElsevierGlyph\{2275\}/g,"≵"],[/\\lessgtr /g,"≶"],[/\\gtrless /g,"≷"],[/\\notlessgreater /g,"≸"],[/\\notgreaterless /g,"≹"],[/\\prec /g,"≺"],[/\\succ /g,"≻"],[/\\preccurlyeq /g,"≼"],[/\\succcurlyeq /g,"≽"],[/\\precapprox /g,"≾"],[/\\NotPrecedesTilde /g,"≾-00338"],[/\\succapprox /g,"≿"],[/\\NotSucceedsTilde /g,"≿-00338"],[/\\not\\prec /g,"⊀"],[/\\not\\succ /g,"⊁"],[/\\subset /g,"⊂"],[/\\supset /g,"⊃"],[/\\not\\subset /g,"⊄"],[/\\not\\supset /g,"⊅"],[/\\subseteq /g,"⊆"],[/\\supseteq /g,"⊇"],[/\\not\\subseteq /g,"⊈"],[/\\not\\supseteq /g,"⊉"],[/\\subsetneq /g,"⊊"],[/\\varsubsetneqq /g,"⊊-0FE00"],[/\\supsetneq /g,"⊋"],[/\\varsupsetneq /g,"⊋-0FE00"],[/\\uplus /g,"⊎"],[/\\sqsubset /g,"⊏"],[/\\NotSquareSubset /g,"⊏-00338"],[/\\sqsupset /g,"⊐"],[/\\NotSquareSuperset /g,"⊐-00338"],[/\\sqsubseteq /g,"⊑"],[/\\sqsupseteq /g,"⊒"],[/\\sqcap /g,"⊓"],[/\\sqcup /g,"⊔"],[/\\oplus /g,"⊕"],[/\\ominus /g,"⊖"],[/\\otimes /g,"⊗"],[/\\oslash /g,"⊘"],[/\\odot /g,"⊙"],[/\\circledcirc /g,"⊚"],[/\\circledast /g,"⊛"],[/\\circleddash /g,"⊝"],[/\\boxplus /g,"⊞"],[/\\boxminus /g,"⊟"],[/\\boxtimes /g,"⊠"],[/\\boxdot /g,"⊡"],[/\\vdash /g,"⊢"],[/\\dashv /g,"⊣"],[/\\top /g,"⊤"],[/\\perp /g,"⊥"],[/\\truestate /g,"⊧"],[/\\forcesextra /g,"⊨"],[/\\Vdash /g,"⊩"],[/\\Vvdash /g,"⊪"],[/\\VDash /g,"⊫"],[/\\nvdash /g,"⊬"],[/\\nvDash /g,"⊭"],[/\\nVdash /g,"⊮"],[/\\nVDash /g,"⊯"],[/\\vartriangleleft /g,"⊲"],[/\\vartriangleright /g,"⊳"],[/\\trianglelefteq /g,"⊴"],[/\\trianglerighteq /g,"⊵"],[/\\original /g,"⊶"],[/\\image /g,"⊷"],[/\\multimap /g,"⊸"],[/\\hermitconjmatrix /g,"⊹"],[/\\intercal /g,"⊺"],[/\\veebar /g,"⊻"],[/\\rightanglearc /g,"⊾"],[/\\ElsevierGlyph\{22C0\}/g,"⋀"],[/\\ElsevierGlyph\{22C1\}/g,"⋁"],[/\\bigcap /g,"⋂"],[/\\bigcup /g,"⋃"],[/\\diamond /g,"⋄"],[/\\cdot /g,"⋅"],[/\\star /g,"⋆"],[/\\divideontimes /g,"⋇"],[/\\bowtie /g,"⋈"],[/\\ltimes /g,"⋉"],[/\\rtimes /g,"⋊"],[/\\leftthreetimes /g,"⋋"],[/\\rightthreetimes /g,"⋌"],[/\\backsimeq /g,"⋍"],[/\\curlyvee /g,"⋎"],[/\\curlywedge /g,"⋏"],[/\\Subset /g,"⋐"],[/\\Supset /g,"⋑"],[/\\Cap /g,"⋒"],[/\\Cup /g,"⋓"],[/\\pitchfork /g,"⋔"],[/\\lessdot /g,"⋖"],[/\\gtrdot /g,"⋗"],[/\\verymuchless /g,"⋘"],[/\\verymuchgreater /g,"⋙"],[/\\lesseqgtr /g,"⋚"],[/\\gtreqless /g,"⋛"],[/\\curlyeqprec /g,"⋞"],[/\\curlyeqsucc /g,"⋟"],[/\\not\\sqsubseteq /g,"⋢"],[/\\not\\sqsupseteq /g,"⋣"],[/\\Elzsqspne /g,"⋥"],[/\\lnsim /g,"⋦"],[/\\gnsim /g,"⋧"],[/\\precedesnotsimilar /g,"⋨"],[/\\succnsim /g,"⋩"],[/\\ntriangleleft /g,"⋪"],[/\\ntriangleright /g,"⋫"],[/\\ntrianglelefteq /g,"⋬"],[/\\ntrianglerighteq /g,"⋭"],[/\\vdots /g,"⋮"],[/\\cdots /g,"⋯"],[/\\upslopeellipsis /g,"⋰"],[/\\downslopeellipsis /g,"⋱"],[/\\barwedge /g,"⌅"],[/\\perspcorrespond /g,"⌆"],[/\\lceil /g,"⌈"],[/\\rceil /g,"⌉"],[/\\lfloor /g,"⌊"],[/\\rfloor /g,"⌋"],[/\\recorder /g,"⌕"],[/\\mathchar"2208/g,"⌖"],[/\\ulcorner /g,"⌜"],[/\\urcorner /g,"⌝"],[/\\llcorner /g,"⌞"],[/\\lrcorner /g,"⌟"],[/\\frown /g,"⌢"],[/\\smile /g,"⌣"],[/\\langle /g,"〈"],[/\\rangle /g,"〉"],[/\\ElsevierGlyph\{E838\}/g,"⌽"],[/\\Elzdlcorn /g,"⎣"],[/\\lmoustache /g,"⎰"],[/\\rmoustache /g,"⎱"],[/\\textvisiblespace /g,"␣"],[/\\ding\{172\}/g,"①"],[/\\ding\{173\}/g,"②"],[/\\ding\{174\}/g,"③"],[/\\ding\{175\}/g,"④"],[/\\ding\{176\}/g,"⑤"],[/\\ding\{177\}/g,"⑥"],[/\\ding\{178\}/g,"⑦"],[/\\ding\{179\}/g,"⑧"],[/\\ding\{180\}/g,"⑨"],[/\\ding\{181\}/g,"⑩"],[/\\circledS /g,"Ⓢ"],[/\\Elzdshfnc /g,"┆"],[/\\Elzsqfnw /g,"┙"],[/\\diagup /g,"╱"],[/\\ding\{110\}/g,"■"],[/\\square /g,"□"],[/\\blacksquare /g,"▪"],[/\\fbox\{~~\}/g,"▭"],[/\\Elzvrecto /g,"▯"],[/\\ElsevierGlyph\{E381\}/g,"▱"],[/\\ding\{115\}/g,"▲"],[/\\bigtriangleup /g,"△"],[/\\blacktriangle /g,"▴"],[/\\vartriangle /g,"▵"],[/\\blacktriangleright /g,"▸"],[/\\triangleright /g,"▹"],[/\\ding\{116\}/g,"▼"],[/\\bigtriangledown /g,"▽"],[/\\blacktriangledown /g,"▾"],[/\\triangledown /g,"▿"],[/\\blacktriangleleft /g,"◂"],[/\\triangleleft /g,"◃"],[/\\ding\{117\}/g,"◆"],[/\\lozenge /g,"◊"],[/\\bigcirc /g,"○"],[/\\ding\{108\}/g,"●"],[/\\Elzcirfl /g,"◐"],[/\\Elzcirfr /g,"◑"],[/\\Elzcirfb /g,"◒"],[/\\ding\{119\}/g,"◗"],[/\\Elzrvbull /g,"◘"],[/\\Elzsqfl /g,"◧"],[/\\Elzsqfr /g,"◨"],[/\\Elzsqfse /g,"◪"],[/\\bigcirc /g,"◯"],[/\\ding\{72\}/g,"★"],[/\\ding\{73\}/g,"☆"],[/\\ding\{37\}/g,"☎"],[/\\ding\{42\}/g,"☛"],[/\\ding\{43\}/g,"☞"],[/\\rightmoon /g,"☾"],[/\\mercury /g,"☿"],[/\\venus /g,"♀"],[/\\male /g,"♂"],[/\\jupiter /g,"♃"],[/\\saturn /g,"♄"],[/\\uranus /g,"♅"],[/\\neptune /g,"♆"],[/\\pluto /g,"♇"],[/\\aries /g,"♈"],[/\\taurus /g,"♉"],[/\\gemini /g,"♊"],[/\\cancer /g,"♋"],[/\\leo /g,"♌"],[/\\virgo /g,"♍"],[/\\libra /g,"♎"],[/\\scorpio /g,"♏"],[/\\sagittarius /g,"♐"],[/\\capricornus /g,"♑"],[/\\aquarius /g,"♒"],[/\\pisces /g,"♓"],[/\\ding\{171\}/g,"♠"],[/\\diamond /g,"♢"],[/\\ding\{168\}/g,"♣"],[/\\ding\{170\}/g,"♥"],[/\\ding\{169\}/g,"♦"],[/\\quarternote /g,"♩"],[/\\eighthnote /g,"♪"],[/\\flat /g,"♭"],[/\\natural /g,"♮"],[/\\sharp /g,"♯"],[/\\ding\{33\}/g,"✁"],[/\\ding\{34\}/g,"✂"],[/\\ding\{35\}/g,"✃"],[/\\ding\{36\}/g,"✄"],[/\\ding\{38\}/g,"✆"],[/\\ding\{39\}/g,"✇"],[/\\ding\{40\}/g,"✈"],[/\\ding\{41\}/g,"✉"],[/\\ding\{44\}/g,"✌"],[/\\ding\{45\}/g,"✍"],[/\\ding\{46\}/g,"✎"],[/\\ding\{47\}/g,"✏"],[/\\ding\{48\}/g,"✐"],[/\\ding\{49\}/g,"✑"],[/\\ding\{50\}/g,"✒"],[/\\ding\{51\}/g,"✓"],[/\\ding\{52\}/g,"✔"],[/\\ding\{53\}/g,"✕"],[/\\ding\{54\}/g,"✖"],[/\\ding\{55\}/g,"✗"],[/\\ding\{56\}/g,"✘"],[/\\ding\{57\}/g,"✙"],[/\\ding\{58\}/g,"✚"],[/\\ding\{59\}/g,"✛"],[/\\ding\{60\}/g,"✜"],[/\\ding\{61\}/g,"✝"],[/\\ding\{62\}/g,"✞"],[/\\ding\{63\}/g,"✟"],[/\\ding\{64\}/g,"✠"],[/\\ding\{65\}/g,"✡"],[/\\ding\{66\}/g,"✢"],[/\\ding\{67\}/g,"✣"],[/\\ding\{68\}/g,"✤"],[/\\ding\{69\}/g,"✥"],[/\\ding\{70\}/g,"✦"],[/\\ding\{71\}/g,"✧"],[/\\ding\{73\}/g,"✩"],[/\\ding\{74\}/g,"✪"],[/\\ding\{75\}/g,"✫"],[/\\ding\{76\}/g,"✬"],[/\\ding\{77\}/g,"✭"],[/\\ding\{78\}/g,"✮"],[/\\ding\{79\}/g,"✯"],[/\\ding\{80\}/g,"✰"],[/\\ding\{81\}/g,"✱"],[/\\ding\{82\}/g,"✲"],[/\\ding\{83\}/g,"✳"],[/\\ding\{84\}/g,"✴"],[/\\ding\{85\}/g,"✵"],[/\\ding\{86\}/g,"✶"],[/\\ding\{87\}/g,"✷"],[/\\ding\{88\}/g,"✸"],[/\\ding\{89\}/g,"✹"],[/\\ding\{90\}/g,"✺"],[/\\ding\{91\}/g,"✻"],[/\\ding\{92\}/g,"✼"],[/\\ding\{93\}/g,"✽"],[/\\ding\{94\}/g,"✾"],[/\\ding\{95\}/g,"✿"],[/\\ding\{96\}/g,"❀"],[/\\ding\{97\}/g,"❁"],[/\\ding\{98\}/g,"❂"],[/\\ding\{99\}/g,"❃"],[/\\ding\{100\}/g,"❄"],[/\\ding\{101\}/g,"❅"],[/\\ding\{102\}/g,"❆"],[/\\ding\{103\}/g,"❇"],[/\\ding\{104\}/g,"❈"],[/\\ding\{105\}/g,"❉"],[/\\ding\{106\}/g,"❊"],[/\\ding\{107\}/g,"❋"],[/\\ding\{109\}/g,"❍"],[/\\ding\{111\}/g,"❏"],[/\\ding\{112\}/g,"❐"],[/\\ding\{113\}/g,"❑"],[/\\ding\{114\}/g,"❒"],[/\\ding\{118\}/g,"❖"],[/\\ding\{120\}/g,"❘"],[/\\ding\{121\}/g,"❙"],[/\\ding\{122\}/g,"❚"],[/\\ding\{123\}/g,"❛"],[/\\ding\{124\}/g,"❜"],[/\\ding\{125\}/g,"❝"],[/\\ding\{126\}/g,"❞"],[/\\ding\{161\}/g,"❡"],[/\\ding\{162\}/g,"❢"],[/\\ding\{163\}/g,"❣"],[/\\ding\{164\}/g,"❤"],[/\\ding\{165\}/g,"❥"],[/\\ding\{166\}/g,"❦"],[/\\ding\{167\}/g,"❧"],[/\\ding\{182\}/g,"❶"],[/\\ding\{183\}/g,"❷"],[/\\ding\{184\}/g,"❸"],[/\\ding\{185\}/g,"❹"],[/\\ding\{186\}/g,"❺"],[/\\ding\{187\}/g,"❻"],[/\\ding\{188\}/g,"❼"],[/\\ding\{189\}/g,"❽"],[/\\ding\{190\}/g,"❾"],[/\\ding\{191\}/g,"❿"],[/\\ding\{192\}/g,"➀"],[/\\ding\{193\}/g,"➁"],[/\\ding\{194\}/g,"➂"],[/\\ding\{195\}/g,"➃"],[/\\ding\{196\}/g,"➄"],[/\\ding\{197\}/g,"➅"],[/\\ding\{198\}/g,"➆"],[/\\ding\{199\}/g,"➇"],[/\\ding\{200\}/g,"➈"],[/\\ding\{201\}/g,"➉"],[/\\ding\{202\}/g,"➊"],[/\\ding\{203\}/g,"➋"],[/\\ding\{204\}/g,"➌"],[/\\ding\{205\}/g,"➍"],[/\\ding\{206\}/g,"➎"],[/\\ding\{207\}/g,"➏"],[/\\ding\{208\}/g,"➐"],[/\\ding\{209\}/g,"➑"],[/\\ding\{210\}/g,"➒"],[/\\ding\{211\}/g,"➓"],[/\\ding\{212\}/g,"➔"],[/\\ding\{216\}/g,"➘"],[/\\ding\{217\}/g,"➙"],[/\\ding\{218\}/g,"➚"],[/\\ding\{219\}/g,"➛"],[/\\ding\{220\}/g,"➜"],[/\\ding\{221\}/g,"➝"],[/\\ding\{222\}/g,"➞"],[/\\ding\{223\}/g,"➟"],[/\\ding\{224\}/g,"➠"],[/\\ding\{225\}/g,"➡"],[/\\ding\{226\}/g,"➢"],[/\\ding\{227\}/g,"➣"],[/\\ding\{228\}/g,"➤"],[/\\ding\{229\}/g,"➥"],[/\\ding\{230\}/g,"➦"],[/\\ding\{231\}/g,"➧"],[/\\ding\{232\}/g,"➨"],[/\\ding\{233\}/g,"➩"],[/\\ding\{234\}/g,"➪"],[/\\ding\{235\}/g,"➫"],[/\\ding\{236\}/g,"➬"],[/\\ding\{237\}/g,"➭"],[/\\ding\{238\}/g,"➮"],[/\\ding\{239\}/g,"➯"],[/\\ding\{241\}/g,"➱"],[/\\ding\{242\}/g,"➲"],[/\\ding\{243\}/g,"➳"],[/\\ding\{244\}/g,"➴"],[/\\ding\{245\}/g,"➵"],[/\\ding\{246\}/g,"➶"],[/\\ding\{247\}/g,"➷"],[/\\ding\{248\}/g,"➸"],[/\\ding\{249\}/g,"➹"],[/\\ding\{250\}/g,"➺"],[/\\ding\{251\}/g,"➻"],[/\\ding\{252\}/g,"➼"],[/\\ding\{253\}/g,"➽"],[/\\ding\{254\}/g,"➾"],[/\\longleftarrow /g,"⟵"],[/\\longrightarrow /g,"⟶"],[/\\longleftrightarrow /g,"⟷"],[/\\Longleftarrow /g,"⟸"],[/\\Longrightarrow /g,"⟹"],[/\\Longleftrightarrow /g,"⟺"],[/\\longmapsto /g,"⟼"],[/\\sim\\joinrel\\leadsto/g,"⟿"],[/\\ElsevierGlyph\{E212\}/g,"⤅"],[/\\UpArrowBar /g,"⤒"],[/\\DownArrowBar /g,"⤓"],[/\\ElsevierGlyph\{E20C\}/g,"⤣"],[/\\ElsevierGlyph\{E20D\}/g,"⤤"],[/\\ElsevierGlyph\{E20B\}/g,"⤥"],[/\\ElsevierGlyph\{E20A\}/g,"⤦"],[/\\ElsevierGlyph\{E211\}/g,"⤧"],[/\\ElsevierGlyph\{E20E\}/g,"⤨"],[/\\ElsevierGlyph\{E20F\}/g,"⤩"],[/\\ElsevierGlyph\{E210\}/g,"⤪"],[/\\ElsevierGlyph\{E21C\}/g,"⤳"],[/\\ElsevierGlyph\{E21D\}/g,"⤳-00338"],[/\\ElsevierGlyph\{E21A\}/g,"⤶"],[/\\ElsevierGlyph\{E219\}/g,"⤷"],[/\\Elolarr /g,"⥀"],[/\\Elorarr /g,"⥁"],[/\\ElzRlarr /g,"⥂"],[/\\ElzrLarr /g,"⥄"],[/\\Elzrarrx /g,"⥇"],[/\\LeftRightVector /g,"⥎"],[/\\RightUpDownVector /g,"⥏"],[/\\DownLeftRightVector /g,"⥐"],[/\\LeftUpDownVector /g,"⥑"],[/\\LeftVectorBar /g,"⥒"],[/\\RightVectorBar /g,"⥓"],[/\\RightUpVectorBar /g,"⥔"],[/\\RightDownVectorBar /g,"⥕"],[/\\DownLeftVectorBar /g,"⥖"],[/\\DownRightVectorBar /g,"⥗"],[/\\LeftUpVectorBar /g,"⥘"],[/\\LeftDownVectorBar /g,"⥙"],[/\\LeftTeeVector /g,"⥚"],[/\\RightTeeVector /g,"⥛"],[/\\RightUpTeeVector /g,"⥜"],[/\\RightDownTeeVector /g,"⥝"],[/\\DownLeftTeeVector /g,"⥞"],[/\\DownRightTeeVector /g,"⥟"],[/\\LeftUpTeeVector /g,"⥠"],[/\\LeftDownTeeVector /g,"⥡"],[/\\UpEquilibrium /g,"⥮"],[/\\ReverseUpEquilibrium /g,"⥯"],[/\\RoundImplies /g,"⥰"],[/\\ElsevierGlyph\{E214\}/g,"⥼"],[/\\ElsevierGlyph\{E215\}/g,"⥽"],[/\\Elztfnc /g,"⦀"],[/\\ElsevierGlyph\{3018\}/g,"⦅"],[/\\Elroang /g,"⦆"],[/\\ElsevierGlyph\{E291\}/g,"⦔"],[/\\Elzddfnc /g,"⦙"],[/\\Angle /g,"⦜"],[/\\Elzlpargt /g,"⦠"],[/\\ElsevierGlyph\{E260\}/g,"⦵"],[/\\ElsevierGlyph\{E61B\}/g,"⦶"],[/\\ElzLap /g,"⧊"],[/\\Elzdefas /g,"⧋"],[/\\LeftTriangleBar /g,"⧏"],[/\\NotLeftTriangleBar /g,"⧏-00338"],[/\\RightTriangleBar /g,"⧐"],[/\\NotRightTriangleBar /g,"⧐-00338"],[/\\ElsevierGlyph\{E372\}/g,"⧜"],[/\\blacklozenge /g,"⧫"],[/\\RuleDelayed /g,"⧴"],[/\\Elxuplus /g,"⨄"],[/\\ElzThr /g,"⨅"],[/\\Elxsqcup /g,"⨆"],[/\\ElzInf /g,"⨇"],[/\\ElzSup /g,"⨈"],[/\\ElzCint /g,"⨍"],[/\\clockoint /g,"⨏"],[/\\ElsevierGlyph\{E395\}/g,"⨐"],[/\\sqrint /g,"⨖"],[/\\ElsevierGlyph\{E25A\}/g,"⨥"],[/\\ElsevierGlyph\{E25B\}/g,"⨪"],[/\\ElsevierGlyph\{E25C\}/g,"⨭"],[/\\ElsevierGlyph\{E25D\}/g,"⨮"],[/\\ElzTimes /g,"⨯"],[/\\ElsevierGlyph\{E25E\}/g,"⨴"],[/\\ElsevierGlyph\{E25E\}/g,"⨵"],[/\\ElsevierGlyph\{E259\}/g,"⨼"],[/\\amalg /g,"⨿"],[/\\ElzAnd /g,"⩓"],[/\\ElzOr /g,"⩔"],[/\\ElsevierGlyph\{E36E\}/g,"⩕"],[/\\ElOr /g,"⩖"],[/\\perspcorrespond /g,"⩞"],[/\\Elzminhat /g,"⩟"],[/\\ElsevierGlyph\{225A\}/g,"⩣"],[/\\stackrel\{*\}\{=\}/g,"⩮"],[/\\Equal /g,"⩵"],[/\\leqslant /g,"⩽"],[/\\nleqslant /g,"⩽-00338"],[/\\geqslant /g,"⩾"],[/\\ngeqslant /g,"⩾-00338"],[/\\lessapprox /g,"⪅"],[/\\gtrapprox /g,"⪆"],[/\\lneq /g,"⪇"],[/\\gneq /g,"⪈"],[/\\lnapprox /g,"⪉"],[/\\gnapprox /g,"⪊"],[/\\lesseqqgtr /g,"⪋"],[/\\gtreqqless /g,"⪌"],[/\\eqslantless /g,"⪕"],[/\\eqslantgtr /g,"⪖"],[/\\Pisymbol\{ppi020\}\{117\}/g,"⪝"],[/\\Pisymbol\{ppi020\}\{105\}/g,"⪞"],[/\\NestedLessLess /g,"⪡"],[/\\NotNestedLessLess /g,"⪡-00338"],[/\\NestedGreaterGreater /g,"⪢"],[/\\NotNestedGreaterGreater /g,"⪢-00338"],[/\\preceq /g,"⪯"],[/\\not\\preceq /g,"⪯-00338"],[/\\succeq /g,"⪰"],[/\\not\\succeq /g,"⪰-00338"],[/\\precneqq /g,"⪵"],[/\\succneqq /g,"⪶"],[/\\precapprox /g,"⪷"],[/\\succapprox /g,"⪸"],[/\\precnapprox /g,"⪹"],[/\\succnapprox /g,"⪺"],[/\\subseteqq /g,"⫅"],[/\\nsubseteqq /g,"⫅-00338"],[/\\supseteqq /g,"⫆"],[/\\nsupseteqq/g,"⫆-00338"],[/\\subsetneqq /g,"⫋"],[/\\supsetneqq /g,"⫌"],[/\\ElsevierGlyph\{E30D\}/g,"⫫"],[/\\Elztdcol /g,"⫶"],[/\\ElsevierGlyph\{300A\}/g,"《"],[/\\ElsevierGlyph\{300B\}/g,"》"],[/\\ElsevierGlyph\{3018\}/g,"〘"],[/\\ElsevierGlyph\{3019\}/g,"〙"],[/\\openbracketleft /g,"〚"],[/\\openbracketright /g,"〛"]],
this}"undefined"!=typeof t&&t.exports&&(t.exports=i)},function(t,e,i){var n,s;(function(o){n=[i(6),i(18),i(5)],s=function(t,e,i){var n=o.View.extend({tagName:"div",className:"citations",render:function(){return this.$el.append(""+this.formattedReference()+"
"),this},formattedReference:function(){var t=this.model,e=t.entryType(),i=t.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"==e){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"==e||"proceedings"==e?s+this._asSentence(o)+(i.booktitle?"In "+i.booktitle+", ":"")+(a?a:"")+(r?", "+r:"")+". ":"mastersthesis"==e||"phdthesis"==e?s+this._asSentence(o)+(i.howpublished?i.howpublished+". ":"")+(i.note?i.note+".":""):"techreport"==e?s+this._asSentence(o)+this._asSentence(i.institution)+this._asSentence(i.number)+this._asSentence(i.type):"book"==e||"inbook"==e||"incollection"==e?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(t){var e="";return t.chapter&&(e+=t.chapter+" in "),t.title&&(e+=""+t.title+" "),t.editor&&(e+=", Edited by "+t.editor+", "),t.publisher&&(e+=", "+t.publisher),t.pages&&(e+=", pp. "+t.pages),t.series&&(e+=", "+t.series+" "),t.volume&&(e+=", Vol."+t.volume),t.issn&&(e+=", ISBN: "+t.issn),e+"."},_asSentence:function(t){return t&&t.trim()?t+". ":""}}),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(t){var e=new n({model:t});this.$(".citations-formatted").append(e.render().el);var i=this.$(".citations-bibtex-text");i.val(i.val()+"\n\r"+t.attributes.content)},render:function(){this.$el.html(this.citationsElement()),this.collection.each(function(t){this.renderCitation(t)},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['"].join("")}});return{CitationView:n,CitationListView:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o,a,r){n=[i(42),i(32),i(6),i(5)],s=function(t,e,i,n){"use strict";var s=t.FoldoutListItemView,l=t.ListItemView,c=s.extend({className:s.prototype.className+" dataset-collection",id:function(){return["dataset_collection",this.model.get("id")].join("-")},initialize:function(t){this.linkTarget=t.linkTarget||"_blank",this.hasUser=t.hasUser,s.prototype.initialize.call(this,t)},_setUpListeners:function(){s.prototype._setUpListeners.call(this),this.listenTo(this.model,"change",function(t,e){o.has(t.changed,"deleted")?this.render():o.has(t.changed,"element_count")&&this.$("> .title-bar .subtitle").replaceWith(this._renderSubtitle())})},_renderSubtitle:function(){return a(this.templates.subtitle(this.model.toJSON(),this))},_getFoldoutPanelOptions:function(){var t=s.prototype._getFoldoutPanelOptions.call(this);return o.extend(t,{linkTarget:this.linkTarget,hasUser:this.hasUser})},$selector:function(){return this.$("> .selector")},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCListItemView("+t+")"}});c.prototype.templates=function(){var t=o.extend({},s.prototype.templates.warnings,{error:i.wrapTemplate(["<% if( model.error ){ %>",'',n("There was an error getting the data for this collection"),": <%- model.error %>","
","<% } %>"]),purged:i.wrapTemplate(["<% if( model.purged ){ %>",'',n("This collection has been deleted and removed from disk"),"
","<% } %>"]),deleted:i.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'',n("This collection has been deleted"),"
","<% } %>"])}),e=i.wrapTemplate(['','
','<%- collection.element_identifier || collection.name %> ',"
",'
',"
"],"collection"),a=i.wrapTemplate(['','<% var countText = collection.element_count? ( collection.element_count + " " ) : ""; %>','<% if( collection.collection_type === "list" ){ %>',n("a list of <%- countText %>datasets"),'<% } else if( collection.collection_type === "paired" ){ %>',n("a pair of datasets"),'<% } else if( collection.collection_type === "list:paired" ){ %>',n("a list of <%- countText %>dataset pairs"),"<% } %>","
"],"collection");return o.extend({},s.prototype.templates,{warnings:t,titleBar:e,subtitle:a})}();var d=l.extend({className:l.prototype.className+" dataset-collection-element",initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log("DCEListItemView.initialize:",t),l.prototype.initialize.call(this,t)},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCEListItemView("+t+")"}});d.prototype.templates=function(){var t=i.wrapTemplate(['','
','<%- element.element_identifier %> ',"
",'
',"
"],"element");return o.extend({},l.prototype.templates,{titleBar:t})}();var h=e.DatasetListItemView.extend({className:e.DatasetListItemView.prototype.className+" dataset-collection-element",initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log("DatasetDCEListItemView.initialize:",t),e.DatasetListItemView.prototype.initialize.call(this,t)},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):r.when()},toString:function(){var t=this.model?this.model+"":"(no model)";return"DatasetDCEListItemView("+t+")"}});h.prototype.templates=function(){var t=i.wrapTemplate(['','
','
','<%- element.element_identifier %> ',"
","
"],"element");return o.extend({},e.DatasetListItemView.prototype.templates,{titleBar:t})}();var u=c.extend({className:c.prototype.className+" dataset-collection-element",_swapNewRender:function(t){c.prototype._swapNewRender.call(this,t);var e=this.model.get("state")||"ok";return this.$el.addClass("state-"+e),this.$el},toString:function(){var t=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemView("+t+")"}});return{DCListItemView:c,DCEListItemView:d,DatasetDCEListItemView:h,NestedDCDCEListItemView:u}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(70),i(6),i(5)],s=function(t,e,i){"use strict";var n="collections",s={defaults:{model_class:"DatasetCollectionElement",element_identifier:null,element_index:null,element_type:null},_mergeObject:function(t){return o.extend(t,t.object,{element_id:t.id}),delete t.object,t},constructor:function(t,e){t=this._mergeObject(t),this.idAttribute="element_id",a.Model.apply(this,arguments)},parse:function(t,e){var i=t;return i=this._mergeObject(i)}},l=a.Model.extend(e.LoggableMixin).extend(s).extend({_logNamespace:n}),c=a.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,model:l,initialize:function(t,e){this.debug(this+"(DCECollection).initialize:",t,e),e=e||{}},toString:function(){return["DatasetCollectionElementCollection(",this.length,")"].join("")}}),d=t.DatasetAssociation.extend(e.mixin(s,{url:function(){return this.has("history_id")?Galaxy.root+"api/histories/"+this.get("history_id")+"/contents/"+this.get("id"):(console.warn("no endpoint for non-hdas within a collection yet"),Galaxy.root+"api/datasets")},defaults:o.extend({},t.DatasetAssociation.prototype.defaults,s.defaults),constructor:function(t,e){this.debug(" DatasetDCE.constructor:",t,e),s.constructor.call(this,t,e)},initialize:function(e,i){this.debug(this+"(DatasetDCE).initialize:",e,i),t.DatasetAssociation.prototype.initialize.call(this,e,i)},hasDetails:function(){return o.has(this.attributes,"annotation")},toString:function(){var t=this.get("element_identifier");return["DatasetDCE(",t,")"].join("")}})),h=c.extend({model:d,initialize:function(t,e){this.debug(this+"(DatasetDCECollection).initialize:",t,e),c.prototype.initialize.call(this,t,e)},toString:function(){return["DatasetDCECollection(",this.length,")"].join("")}}),u=a.Model.extend(e.LoggableMixin).extend(e.SearchableModelMixin).extend({_logNamespace:n,defaults:{collection_type:null,deleted:!1},collectionClass:c,initialize:function(t,e){this.debug(this+"(DatasetCollection).initialize:",t,e,this),this.elements=this._createElementsModel(),this.on("change:elements",function(){this.log("change:elements"),this.elements=this._createElementsModel()})},_createElementsModel:function(){this.debug(this+"._createElementsModel",this.collectionClass,this.get("elements"),this.elements);var t=this.get("elements")||[];return this.unset("elements",{silent:!0}),this.elements=new this.collectionClass(t),this.elements},toJSON:function(){var t=a.Model.prototype.toJSON.call(this);return this.elements&&(t.elements=this.elements.toJSON()),t},inReadyState:function(){var t=this.get("populated");return this.isDeletedOrPurged()||t},hasDetails:function(){return this.debug("hasDetails:",this.elements.length),0!==this.elements.length},getVisibleContents:function(t){return this.elements},"delete":function(t){return this.get("deleted")?r.when():this.save({deleted:!0},t)},undelete:function(t){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},t)},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},searchAttributes:["name"],toString:function(){var t=[this.get("id"),this.get("name")||this.get("element_identifier")];return"DatasetCollection("+t.join(",")+")"}}),p=u.extend({collectionClass:h,initialize:function(t,e){this.debug(this+"(ListDatasetCollection).initialize:",t,e),u.prototype.initialize.call(this,t,e)},toString:function(){return["ListDatasetCollection(",this.get("name"),")"].join("")}}),g=p.extend({initialize:function(t,e){this.debug(this+"(PairDatasetCollection).initialize:",t,e),p.prototype.initialize.call(this,t,e)},toString:function(){return["PairDatasetCollection(",this.get("name"),")"].join("")}}),f=u.extend(e.mixin(s,{constructor:function(t,e){this.debug(" NestedDCDCE.constructor:",t,e),s.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedDCDCE(",t,")"].join("")}})),m=c.extend({model:f,initialize:function(t,e){this.debug(this+"(NestedDCDCECollection).initialize:",t,e),c.prototype.initialize.call(this,t,e)},toString:function(){return["NestedDCDCECollection(",this.length,")"].join("")}}),v=g.extend(e.mixin(s,{constructor:function(t,e){this.debug(" NestedPairDCDCE.constructor:",t,e),s.constructor.call(this,t,e)},toString:function(){var t=this.object?""+this.object:this.get("element_identifier");return["NestedPairDCDCE(",t,")"].join("")}})),_=m.extend({model:v,initialize:function(t,e){this.debug(this+"(NestedPairDCDCECollection).initialize:",t,e),m.prototype.initialize.call(this,t,e)},toString:function(){return["NestedPairDCDCECollection(",this.length,")"].join("")}}),y=u.extend({collectionClass:_,initialize:function(t,e){this.debug(this+"(ListPairedDatasetCollection).initialize:",t,e),u.prototype.initialize.call(this,t,e)},toString:function(){return["ListPairedDatasetCollection(",this.get("name"),")"].join("")}});return{ListDatasetCollection:p,PairDatasetCollection:g,ListPairedDatasetCollection:y}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(39),i(10),i(6),i(8),i(84),i(5),i(81)],s=function(t,e,i,n,s,c){"use strict";function d(t){var e=t.toJSON(),i=f(e,{creationFn:function(e,i){return e=e.map(function(t){return{id:t.id,name:t.name,src:"dataset"===t.history_content_type?"hda":"hdca"}}),t.createHDCA(e,"list",i)}});return i}var h="collections",u=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,tagName:"li",className:"collection-element",initialize:function(t){this.element=t.element||{},this.selected=t.selected||!1},render:function(){return this.$el.attr("data-element-id",this.element.id).attr("draggable",!0).html(this.template({element:this.element})),this.selected&&this.$el.addClass("selected"),this},template:a.template(['',"<%- element.name %>"," ",'',c("Discard")," "].join("")),select:function(t){this.$el.toggleClass("selected",t),this.trigger("select",{source:this,selected:this.$el.hasClass("selected")})},discard:function(){var t=this,e=this.$el.parent().width();this.$el.animate({"margin-right":e},"fast",function(){t.trigger("discard",{source:t}),t.destroy()})},destroy:function(){this.off(),this.$el.remove()},events:{click:"_click","click .name":"_clickName","click .discard":"_clickDiscard",dragstart:"_dragstart",dragend:"_dragend",dragover:"_sendToParent",drop:"_sendToParent"},_click:function(t){t.stopPropagation(),this.select(t)},_clickName:function(t){t.stopPropagation(),t.preventDefault();var e=([c("Enter a new name for the element"),":\n(",c("Note that changing the name here will not rename the dataset"),")"].join(""),prompt(c("Enter a new name for the element")+":",this.element.name));e&&(this.element.name=e,this.render())},_clickDiscard:function(t){t.stopPropagation(),this.discard()},_dragstart:function(t){t.originalEvent&&(t=t.originalEvent),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",JSON.stringify(this.element)),this.$el.addClass("dragging"),this.$el.parent().trigger("collection-element.dragstart",[this])},_dragend:function(t){this.$el.removeClass("dragging"),this.$el.parent().trigger("collection-element.dragend",[this])},_sendToParent:function(t){this.$el.parent().trigger(t)},toString:function(){return"DatasetCollectionElementView()"}}),p=o.View.extend(i.LoggableMixin).extend({_logNamespace:h,elementViewClass:u,collectionClass:t.HistoryListDatasetCollection,className:"list-collection-creator collection-creator flex-row-container",minElements:1,defaultAttributes:{creationFn:function(){throw new TypeError("no creation fn for creator")},oncreate:function(){},oncancel:function(){},autoscrollDist:24,highlightClr:"rgba( 64, 255, 255, 1.0 )"},initialize:function(t){this.metric("ListCollectionCreator.initialize",t);var e=this;a.each(this.defaultAttributes,function(i,n){i=t[n]||i,e[n]=i}),e.initialElements=t.elements||[],this._instanceSetUp(),this._elementsSetUp(),this._setUpBehaviors()},_instanceSetUp:function(){this.selectedIds={},this.$dragging=null,this.blocking=!1},_elementsSetUp:function(){this.invalidElements=[],this.workingElements=[],this.elementViews=[],this.workingElements=this.initialElements.slice(0),this._ensureElementIds(),this._validateElements(),this._mangleDuplicateNames(),this._sortElements()},_ensureElementIds:function(){return this.workingElements.forEach(function(t){t.hasOwnProperty("id")||(t.id=a.uniqueId())}),this.workingElements},_validateElements:function(){var t=this;return t.invalidElements=[],this.workingElements=this.workingElements.filter(function(e){var i=t._isElementInvalid(e);return i&&t.invalidElements.push({element:e,text:i}),!i}),this.workingElements},_isElementInvalid:function(t){return"dataset"!==t.history_content_type?c("is not a dataset"):t.state!==e.OK?c(a.contains(e.NOT_READY_STATES,t.state)?"hasn't finished running yet":"has errored, is paused, or is not accessible"):t.deleted||t.purged?c("has been deleted or purged"):null},_mangleDuplicateNames:function(){var t=900,e=1,i={};this.workingElements.forEach(function(n){for(var s=n.name;i.hasOwnProperty(s);)if(s=n.name+" ("+e+")",e+=1,e>=t)throw new Error("Safety hit in while loop - thats impressive");n.name=s,i[n.name]=!0})},_sortElements:function(t){},render:function(t,e){return this.workingElements.length .clear-selected").show():this.$(".collection-elements-controls > .clear-selected").hide()},_renderList:function(t,e){var i=this,n=l("
"),s=i.$list();a.each(this.elementViews,function(t){t.destroy(),i.removeElementView(t)}),i.workingElements.forEach(function(t){var e=i._createElementView(t);n.append(e.$el)}),i._renderClearSelected(),s.empty().append(n.children()),a.invoke(i.elementViews,"render"),s.height()>s.css("max-height")?s.css("border-width","1px 0px 1px 0px"):s.css("border-width","0px")},_createElementView:function(t){var e=new this.elementViewClass({element:t,selected:a.has(this.selectedIds,t.id)});return this.elementViews.push(e),this._listenToElementView(e),e},_listenToElementView:function(t){var e=this;e.listenTo(t,{select:function(t){var i=t.source.element;t.selected?e.selectedIds[i.id]=!0:delete e.selectedIds[i.id],e.trigger("elements:select",t)},discard:function(t){e.trigger("elements:discard",t)}})},addElementView:function(t){},removeElementView:function(t){delete this.selectedIds[t.element.id],this._renderClearSelected(),this.elementViews=a.without(this.elementViews,t),this.stopListening(t)},_renderNoElementsLeft:function(){this._disableNameAndCreate(!0),this.$(".collection-elements").append(this.templates.noElementsLeft())},_elementToJSON:function(t){return t},createList:function(t){if(!this.workingElements.length){var e=c("No valid elements for final list")+". ";return e+=''+c("Cancel")+" ",e+=c("or"),e+=' '+c("start over")+" .",void this._showAlert(e)}var i=this,n=this.workingElements.map(function(t){return i._elementToJSON(t)});return i.blocking=!0,i.creationFn(n,t).always(function(){i.blocking=!1}).fail(function(t,e,n){i.trigger("error",{xhr:t,status:e,message:c("An error occurred while creating this collection")})}).done(function(t,e,n){i.trigger("collection:created",t,e,n),i.metric("collection:created",t),"function"==typeof i.oncreate&&i.oncreate.call(this,t,e,n)})},_setUpBehaviors:function(){return this.on("error",this._errorHandler),this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("elements:select",function(t){this._renderClearSelected()}),this.on("elements:discard",function(t){var e=t.source.element;this.removeElementView(t.source),this.workingElements=a.without(this.workingElements,e),this.workingElements.length||this._renderNoElementsLeft()}),this},_errorHandler:function(t){this.error(t);var e=this;if(content=t.message||c("An error occurred"),t.xhr){var i=t.xhr,n=t.message;0===i.readyState&&0===i.status?content+=": "+c("Galaxy could not be reached and may be updating.")+c(" Try again in a few minutes."):i.responseJSON?content+=":"+JSON.stringify(i.responseJSON)+" ":content+=": "+n}e._showAlert(content,"alert-danger")},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .main-help":"_toggleHelp","click .header .alert button":"_hideAlert","click .reset":"reset","click .clear-selected":"clearSelectedElements","click .collection-elements":"clearSelectedElements","dragover .collection-elements":"_dragoverElements","drop .collection-elements":"_dropElements","collection-element.dragstart .collection-elements":"_elementDragstart","collection-element.dragend .collection-elements":"_elementDragend","change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","click .cancel-create":function(t){"function"==typeof this.oncancel&&this.oncancel.call(this)},"click .create-collection":"_clickCreate"},_clickMoreHelp:function(t){t.stopPropagation(),this.$(".main-help").addClass("expanded"),this.$(".more-help").hide()},_clickLessHelp:function(t){t.stopPropagation(),this.$(".main-help").removeClass("expanded"),this.$(".more-help").show()},_toggleHelp:function(t){t.stopPropagation(),this.$(".main-help").toggleClass("expanded"),this.$(".more-help").toggle()},_showAlert:function(t,e){e=e||"alert-danger",this.$(".main-help").hide(),this.$(".header .alert").attr("class","alert alert-dismissable").addClass(e).show().find(".alert-message").html(t)},_hideAlert:function(t){this.$(".main-help").show(),this.$(".header .alert").hide()},reset:function(){this._instanceSetUp(),this._elementsSetUp(),this.render()},clearSelectedElements:function(t){this.$(".collection-elements .collection-element").removeClass("selected"),this.$(".collection-elements-controls > .clear-selected").hide()},_dragoverElements:function(t){t.preventDefault();var e=this.$list();this._checkForAutoscroll(e,t.originalEvent.clientY);var i=this._getNearestElement(t.originalEvent.clientY);this.$(".element-drop-placeholder").remove();var n=r('
');i.length?i.before(n):e.append(n)},_checkForAutoscroll:function(t,e){var i=2,n=t.offset(),s=t.scrollTop(),o=e-n.top,a=n.top+t.outerHeight()-e;o>=0&&o=0&&at&&t>o-a)return s}return r()},_dropElements:function(t){t.originalEvent&&(t=t.originalEvent),t.preventDefault(),t.dataTransfer.dropEffect="move";var e=this._getNearestElement(t.clientY);return e.length?this.$dragging.insertBefore(e):this.$dragging.insertAfter(this.$(".collection-elements .collection-element").last()),this._syncOrderToDom(),!1},_syncOrderToDom:function(){var t=this,e=[];this.$(".collection-elements .collection-element").each(function(){var i=r(this).attr("data-element-id"),n=a.findWhere(t.workingElements,{id:i});n?e.push(n):console.error("missing element: ",i)}),this.workingElements=e,this._renderList()},_elementDragstart:function(t,e){e.select(!0),this.$dragging=this.$(".collection-elements .collection-element.selected")},_elementDragend:function(t,e){r(".element-drop-placeholder").remove(),this.$dragging=null},_changeName:function(t){this._validationWarning("name",!!this._getName())},_nameCheckForEnter:function(t){13!==t.keyCode||this.blocking||this._clickCreate()},_getName:function(){return a.escape(this.$(".collection-name").val())},_clickCreate:function(t){var e=this._getName();e?this.blocking||this.createList(e):this._validationWarning("name")},templates:{main:a.template(['','
',''].join("")),header:a.template(['",'','× ',' ',"
"].join("")),middle:a.template(['",'',"
"].join("")),footer:a.template(['",'','
','
',c("Cancel")," ",'
','',c("Create a different kind of collection"),' '," ",'","
","
",'
','',c("Create list")," ","
","
"].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(['",'"].join(""))},toString:function(){return"ListCollectionCreator"}}),g=function(t,e,i){var s,o=l.Deferred(),r=Galaxy.modal||new n.View;return e=a.defaults(e||{},{elements:t,oncancel:function(){r.hide(),o.reject("cancelled")},oncreate:function(t,e){r.hide(),o.resolve(e)}}),s=new i(e),r.show({title:e.title||c("Create a collection"),body:s.$el,width:"80%",height:"100%",closing_events:!0}),s.render(),window._collectionCreator=s,o},f=function(t,e){return e=e||{},e.title=c("Create a collection from a list of datasets"),g(t,e,p)};return{DatasetCollectionElementView:u,ListCollectionCreator:p,collectionCreatorModal:g,listCollectionCreatorModal:f,createListCollection:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1),i(1))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(42),i(10),i(23),i(6),i(5)],s=function(t,e,i,n,s){
"use strict";var c="dataset",d=t.ListItemView,h=d.extend({_logNamespace:c,className:d.prototype.className+" dataset",id:function(){return["dataset",this.model.get("id")].join("-")},initialize:function(t){t.logger&&(this.logger=this.model.logger=t.logger),this.log(this+".initialize:",t),d.prototype.initialize.call(this,t),this.linkTarget=t.linkTarget||"_blank"},_setUpListeners:function(){d.prototype._setUpListeners.call(this),this.listenTo(this.model,"change",function(t,e){this.model.changedAttributes().state&&this.model.inReadyState()&&this.expanded&&!this.model.hasDetails()?this.model.fetch():this.render()})},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):o.when()},remove:function(t,e){var i=this;t=t||this.fxSpeed,this.$el.fadeOut(t,function(){a.View.prototype.remove.call(i),e&&e.call(i)})},render:function(t){return d.prototype.render.call(this,t)},_swapNewRender:function(t){return d.prototype._swapNewRender.call(this,t),this.model.has("state")&&this.$el.addClass("state-"+this.model.get("state")),this.$el},_renderPrimaryActions:function(){return[this._renderDisplayButton()]},_renderDisplayButton:function(){var t=this.model.get("state");if(t===e.NOT_VIEWABLE||t===e.DISCARDED||!this.model.get("accessible"))return null;var n={target:this.linkTarget,classes:"display-btn"};if(this.model.get("purged"))n.disabled=!0,n.title=s("Cannot display datasets removed from disk");else if(t===e.UPLOAD)n.disabled=!0,n.title=s("This dataset must finish uploading before it can be viewed");else if(t===e.NEW)n.disabled=!0,n.title=s("This dataset is not yet viewable");else{n.title=s("View data"),n.href=this.model.urls.display;var o=this;n.onclick=function(t){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.addDataset(o.model.get("id")),t.preventDefault())}}return n.faIcon="fa-eye",i(n)},_renderDetails:function(){if(this.model.get("state")===e.NOT_VIEWABLE)return r(this.templates.noAccess(this.model.toJSON(),this));var t=d.prototype._renderDetails.call(this);return t.find(".actions .left").empty().append(this._renderSecondaryActions()),t.find(".summary").html(this._renderSummary()).prepend(this._renderDetailMessages()),t.find(".display-applications").html(this._renderDisplayApplications()),this._setUpBehaviors(t),t},_renderSummary:function(){var t=this.model.toJSON(),e=this.templates.summaries[t.state];return(e=e||this.templates.summaries.unknown)(t,this)},_renderDetailMessages:function(){var t=this,e=r('
'),i=t.model.toJSON();return l.each(t.templates.detailMessages,function(n){e.append(r(n(i,t)))}),e},_renderDisplayApplications:function(){return this.model.isDeletedOrPurged()?"":[this.templates.displayApplications(this.model.get("display_apps"),this),this.templates.displayApplications(this.model.get("display_types"),this)].join("")},_renderSecondaryActions:function(){switch(this.debug("_renderSecondaryActions"),this.model.get("state")){case e.NOT_VIEWABLE:return[];case e.OK:case e.FAILED_METADATA:case e.ERROR:return[this._renderDownloadButton(),this._renderShowParamsButton()]}return[this._renderShowParamsButton()]},_renderShowParamsButton:function(){return i({title:s("View details"),classes:"params-btn",href:this.model.urls.show_params,target:this.linkTarget,faIcon:"fa-info-circle"})},_renderDownloadButton:function(){return this.model.get("purged")||!this.model.hasData()?null:l.isEmpty(this.model.get("meta_files"))?r(['',' '," "].join("")):this._renderMetaFileDownloadButton()},_renderMetaFileDownloadButton:function(){var t=this.model.urls;return r(['"].join("\n"))},events:l.extend(l.clone(d.prototype.events),{"click .display-btn":function(t){this.trigger("display",this,t)},"click .params-btn":function(t){this.trigger("params",this,t)},"click .download-btn":function(t){this.trigger("download",this,t)}}),toString:function(){var t=this.model?this.model+"":"(no model)";return"DatasetListItemView("+t+")"}});return h.prototype.templates=function(){var t=l.extend({},d.prototype.templates.warnings,{failed_metadata:n.wrapTemplate(['<% if( model.state === "failed_metadata" ){ %>','',s("An error occurred setting the metadata for this dataset"),"
","<% } %>"]),error:n.wrapTemplate(["<% if( model.error ){ %>",'',s("There was an error getting the data for this dataset"),": <%- model.error %>","
","<% } %>"]),purged:n.wrapTemplate(["<% if( model.purged ){ %>",'',s("This dataset has been deleted and removed from disk"),"
","<% } %>"]),deleted:n.wrapTemplate(["<% if( model.deleted && !model.purged ){ %>",'',s("This dataset has been deleted"),"
","<% } %>"])}),i=n.wrapTemplate(['','
','
","<% if( !dataset.deleted && !dataset.purged ){ %>",'
','
','
',"<% if( dataset.peek ){ %>",'
<%= dataset.peek %> ',"<% } %>","<% } %>","
"],"dataset"),o=n.wrapTemplate(['','
',s("You do not have permission to view this dataset"),"
","
"],"dataset"),a={};a[e.OK]=a[e.FAILED_METADATA]=n.wrapTemplate(["<% if( dataset.misc_blurb ){ %>",'','<%- dataset.misc_blurb %> ',"
","<% } %>","<% if( dataset.file_ext ){ %>",'','',s("format")," ",'<%- dataset.file_ext %> ',"
","<% } %>","<% if( dataset.metadata_dbkey ){ %>",'','',s("database")," ",'',"<%- dataset.metadata_dbkey %>"," ","
","<% } %>","<% if( dataset.misc_info ){ %>",'','<%- dataset.misc_info %> ',"
","<% } %>"],"dataset"),a[e.NEW]=n.wrapTemplate(["",s("This is a new dataset and not all of its data are available yet"),"
"],"dataset"),a[e.NOT_VIEWABLE]=n.wrapTemplate(["",s("You do not have permission to view this dataset"),"
"],"dataset"),a[e.DISCARDED]=n.wrapTemplate(["",s("The job creating this dataset was cancelled before completion"),"
"],"dataset"),a[e.QUEUED]=n.wrapTemplate(["",s("This job is waiting to run"),"
"],"dataset"),a[e.RUNNING]=n.wrapTemplate(["",s("This job is currently running"),"
"],"dataset"),a[e.UPLOAD]=n.wrapTemplate(["",s("This dataset is currently uploading"),"
"],"dataset"),a[e.SETTING_METADATA]=n.wrapTemplate(["",s("Metadata is being auto-detected"),"
"],"dataset"),a[e.PAUSED]=n.wrapTemplate(["",s('This job is paused. Use the "Resume Paused Jobs" in the history menu to resume'),"
"],"dataset"),a[e.ERROR]=n.wrapTemplate(["<% if( !dataset.purged ){ %>","<%- dataset.misc_blurb %>
","<% } %>",'',s("An error occurred with this dataset"),": ",'<%- dataset.misc_info %>
'],"dataset"),a[e.EMPTY]=n.wrapTemplate(["",s("No data"),": <%- dataset.misc_blurb %>
"],"dataset"),a.unknown=n.wrapTemplate(['Error: unknown dataset state: "<%- dataset.state %>"
'],"dataset");var r={resubmitted:n.wrapTemplate(["<% if( model.resubmitted ){ %>",'',s("The job creating this dataset has been resubmitted"),"
","<% } %>"])},c=n.wrapTemplate(["<% _.each( apps, function( app ){ %>",'','
<%- app.label %> ','
',"<% _.each( app.links, function( link ){ %>",'',"<% print( _l( link.text ) ); %>"," ","<% }); %>"," ","
","<% }); %>"],"apps");return l.extend({},d.prototype.templates,{warnings:t,details:i,noAccess:o,summaries:a,detailMessages:r,displayApplications:c})}(),{DatasetListItemView:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4)],s=function(t){var e=o.Model.extend({initialize:function(t){this.app=t},checksum:function(){var t="",e=this;return this.app.section.$el.find(".section-row").each(function(){var i=a(this).attr("id"),n=e.app.field_list[i];n&&(t+=i+":"+JSON.stringify(n.value&&n.value())+":"+n.collapsed+";")}),t},create:function(){function t(t,e,i){n.flat_dict[t]=e,o[t]=i,n.app.element_list[e]&&n.app.element_list[e].$el.attr("tour_id",t)}function e(s,o){for(var a in o){var r=o[a];if(r.input){var l=r.input,c=s;switch(""!=s&&(c+="|"),c+=l.name,l.type){case"repeat":var d="section-",h=[],u=null;for(var p in r){var g=p.indexOf(d);-1!=g&&(g+=d.length,h.push(parseInt(p.substr(g))),u||(u=p.substr(0,g)))}h.sort(function(t,e){return t-e});var a=0;for(var f in h)e(c+"_"+a++,r[u+h[f]]);break;case"conditional":var m=n.app.field_list[l.id].value();t(c+"|"+l.test_param.name,l.id,m);var v=i(l,m);-1!=v&&e(c,o[l.id+"-section-"+v]);break;case"section":e(!l.flat&&c||"",r);break;default:var _=n.app.field_list[l.id];if(_&&_.value){var m=_.value();if((void 0===l.ignore||l.ignore!=m)&&(_.collapsed&&l.collapsible_value&&(m=l.collapsible_value),t(c,l.id,m),l.payload))for(var y in l.payload)t(y,l.id,l.payload[y])}}}}}var n=this,s={};this._iterate(this.app.section.$el,s);var o={};return this.flat_dict={},e("",s),o},match:function(t){return this.flat_dict&&this.flat_dict[t]},matchCase:function(t,e){return i(t,e)},matchModel:function(t,e){var i=this;n(t.inputs,function(t,n){i.flat_dict[n]&&e(t,i.flat_dict[n])})},matchResponse:function(t){function e(t,s){if("string"==typeof s){var o=n.flat_dict[t];o&&(i[o]=s)}else for(var a in s){var r=a;if(""!==t){var l="|";s instanceof Array&&(l="_"),r=t+l+r}e(r,s[a])}}var i={},n=this;return e("",t),i},_iterate:function(t,e){var i=this,n=a(t).children();n.each(function(){var t=this,n=a(t).attr("id");if(a(t).hasClass("section-row")){var s=i.app.input_list[n];e[n]=s&&{input:s}||{},i._iterate(t,e[n])}else i._iterate(t,e)})}}),i=function(t,e){"boolean"==t.test_param.type&&(e="true"==e?t.test_param.truevalue||"true":t.test_param.falsevalue||"false");for(var i in t.cases)if(t.cases[i].value==e)return i;return-1},n=function(t,e,s,o){o=a.extend(!0,{},o),r.each(t,function(t){t&&t.type&&t.name&&(o[t.name]=t)});for(var l in t){var c=t[l],d=s?s+"|"+c.name:c.name;switch(c.type){case"repeat":r.each(c.cache,function(t,i){n(t,e,d+"_"+i,o)});break;case"conditional":if(c.test_param){e(c.test_param,d+"|"+c.test_param.name,o);var h=i(c,c.test_param.value);-1!=h?n(c.cases[h].inputs,e,d,o):Galaxy.emit.debug("form-data::visitInputs() - Invalid case for "+d+".")}else Galaxy.emit.debug("form-data::visitInputs() - Conditional test parameter missing for "+d+".");break;case"section":n(c.inputs,e,d,o);break;default:e(c,d,o)}}};return{Manager:e,visitInputs:n}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(i,o,a){n=[],s=function(){return i.View.extend({initialize:function(t,e){this.app=t,this.app_options=t.options||{},this.field=e&&e.field||new i.View,this.model=e&&e.model||new i.Model({text_enable:this.app_options.text_enable||"Enable",text_disable:this.app_options.text_disable||"Disable",cls_enable:this.app_options.cls_enable||"fa fa-caret-square-o-down",cls_disable:this.app_options.cls_disable||"fa fa-caret-square-o-up"}).set(e),this.setElement(this._template()),this.$field=this.$(".ui-form-field"),this.$info=this.$(".ui-form-info"),this.$preview=this.$(".ui-form-preview"),this.$collapsible=this.$(".ui-form-collapsible"),this.$collapsible_text=this.$(".ui-form-collapsible-text"),this.$collapsible_icon=this.$(".ui-form-collapsible-icon"),this.$title=this.$(".ui-form-title"),this.$title_text=this.$(".ui-form-title-text"),this.$error_text=this.$(".ui-form-error-text"),this.$error=this.$(".ui-form-error"),this.$backdrop=this.$(".ui-form-backdrop"),this.$field.prepend(this.field.$el);var n=this.model.get("collapsible_value");this.field.collapsed=void 0!==n&&JSON.stringify(this.model.get("value"))==JSON.stringify(n),this.listenTo(this.model,"change",this.render,this),this.render();var s=this;this.$collapsible.on("click",function(){s.field.collapsed=!s.field.collapsed,t.trigger&&t.trigger("change"),s.render()})},backdrop:function(){this.model.set("backdrop",!0)},error:function(t){this.model.set("error_text",t)},reset:function(){this.model.set("error_text",null)},render:function(){o(".tooltip").hide();var t=this.model.get("help",""),e=this.model.get("argument");e&&-1==t.indexOf("("+e+")")&&(t+=" ("+e+")"),this.$info.html(t),this.$preview[this.field.collapsed&&this.model.get("collapsible_preview")||this.model.get("disabled")?"show":"hide"]().html(a.escape(this.model.get("text_value")));var i=this.model.get("error_text");if(this.$error[i?"show":"hide"](),this.$el[i?"addClass":"removeClass"]("ui-error"),this.$error_text.html(i),this.$backdrop[this.model.get("backdrop")?"show":"hide"](),this.field.collapsed||this.model.get("disabled")?this.$field.hide():this.$field.fadeIn("fast"),this.field.model&&this.field.model.set({color:this.model.get("color"),style:this.model.get("style")}),this.model.get("disabled")||void 0===this.model.get("collapsible_value"))this.$title_text.show().text(this.model.get("label")),this.$collapsible.hide();else{var n=this.field.collapsed?"enable":"disable";this.$title_text.hide(),this.$collapsible.show(),this.$collapsible_text.text(this.model.get("label")),this.$collapsible_icon.removeClass().addClass("icon").addClass(this.model.get("cls_"+n)).attr("data-original-title",this.model.get("text_"+n)).tooltip({placement:"bottom"})}},_template:function(){return o("
").addClass("ui-form-element").append(o("
").addClass("ui-form-error ui-error").append(o(" ").addClass("fa fa-arrow-down")).append(o(" ").addClass("ui-form-error-text"))).append(o("
").addClass("ui-form-title").append(o("
").addClass("ui-form-collapsible").append(o(" ").addClass("ui-form-collapsible-icon")).append(o(" ").addClass("ui-form-collapsible-text"))).append(o(" ").addClass("ui-form-title-text"))).append(o("
").addClass("ui-form-field").append(o(" ").addClass("ui-form-info")).append(o("
").addClass("ui-form-backdrop"))).append(o("
").addClass("ui-form-preview"))}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(7),i(49),i(51),i(50),i(47)],s=function(t,e,i,n,s,l){return o.Model.extend({types:{text:"_fieldText",select:"_fieldSelect",data_column:"_fieldSelect",genomebuild:"_fieldSelect",data:"_fieldData",data_collection:"_fieldData",integer:"_fieldSlider","float":"_fieldSlider","boolean":"_fieldBoolean",drill_down:"_fieldDrilldown",color:"_fieldColor",hidden:"_fieldHidden",hidden_data:"_fieldHidden",baseurl:"_fieldHidden",library_data:"_fieldLibrary",ftpfile:"_fieldFtp"},initialize:function(t,e){this.app=t},create:function(t){var e=this.types[t.type],i="function"==typeof this[e]?this[e].call(this,t):null;return i||(this.app.incompatible=!0,i=t.options?this._fieldSelect(t):this._fieldText(t),Galaxy.emit.debug("form-parameters::_addRow()","Auto matched field type ("+t.type+").")),void 0===t.value&&(t.value=null),i.value(t.value),i},_fieldData:function(t){var e=this;return new i.View({id:"field-"+t.id,extensions:t.extensions,optional:t.optional,multiple:t.multiple,type:t.type,flavor:t.flavor,data:t.options,onchange:function(){e.app.trigger("change")}})},_fieldSelect:function(t){if(t.is_workflow)return this._fieldText(t);"data_column"==t.type&&(t.error_text="Missing columns in referenced dataset.");var i=[];a.each(t.options,function(t){i.push({label:t[0],value:t[1]})});var n=e.Select;switch(t.display){case"checkboxes":n=e.Checkbox;break;case"radio":n=e.Radio}var s=this;return new n.View({id:"field-"+t.id,data:i,error_text:t.error_text||"No options available",multiple:t.multiple,optional:t.optional,onchange:function(){s.app.trigger("change")}})},_fieldDrilldown:function(t){if(t.is_workflow)return this._fieldText(t);var i=this;return new e.Drilldown.View({id:"field-"+t.id,data:t.options,display:t.display,optional:t.optional,onchange:function(){i.app.trigger("change")}})},_fieldText:function(i){if(i.options)if(i.area=i.multiple,t.isEmpty(i.value))i.value=null;else if(r.isArray(i.value)){var n="";for(var s in i.value){if(n+=String(i.value[s]),!i.multiple)break;n+="\n"}i.value=n}var o=this;return new e.Input({id:"field-"+i.id,area:i.area,onchange:function(t){i.onchange?i.onchange(t):o.app.trigger("change")}})},_fieldSlider:function(t){var i=this;return new e.Slider.View({id:"field-"+t.id,precise:"float"==t.type,is_workflow:t.is_workflow,min:t.min,max:t.max,onchange:function(){i.app.trigger("change")}})},_fieldHidden:function(t){return new e.Hidden({id:"field-"+t.id,info:t.info})},_fieldBoolean:function(t){var i=this;return new e.RadioButton.View({id:"field-"+t.id,data:[{label:"Yes",value:"true"},{label:"No",value:"false"}],onchange:function(){i.app.trigger("change")}})},_fieldColor:function(t){var e=this;return new l({id:"field-"+t.id,onchange:function(){e.app.trigger("change")}})},_fieldLibrary:function(t){var e=this;return new n.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:function(){e.app.trigger("change")}})},_fieldFtp:function(t){var e=this;return new s.View({id:"field-"+t.id,optional:t.optional,multiple:t.multiple,onchange:function(){e.app.trigger("change")}})}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(14),i(9),i(7)],s=function(t,e,i,n){var s=o.View.extend({initialize:function(i){this.options=t.merge(i,{title:"Section",empty_text:"Not available.",max:null,min:null}),this.setElement("
"),this.button_new=new n.ButtonIcon({icon:"fa-plus",title:"Insert "+this.options.title_new,tooltip:"Add new "+this.options.title_new+" block",floating:"clear",onclick:function(){i.onnew&&i.onnew()}}),this.table=new e.View({cls:"ui-table-plain",content:""}),this.$el.append(this.table.$el),this.$el.append(a("
").append(this.button_new.$el)),this.list={},this.n=0},size:function(){return this.n},add:function(t){if(!t.id||this.list[t.id])return void Galaxy.emit.debug("form-repeat::add()","Duplicate repeat block id.");this.n++;var e=new n.ButtonIcon({icon:"fa-trash-o",tooltip:"Delete this repeat block",cls:"ui-button-icon-plain",onclick:function(){t.ondel&&t.ondel()}}),s=new i.View({id:t.id,title:"placeholder",cls:"ui-portlet-repeat",operations:{button_delete:e}});s.append(t.$el),s.$el.addClass("section-row"),this.list[t.id]=s,this.table.add(s.$el),this.table.append("row_"+t.id,!0),this.options.max>0&&this.n>=this.options.max&&this.button_new.disable(),this._refresh()},del:function(t){if(!this.list[t])return void Galaxy.emit.debug("form-repeat::del()","Invalid repeat block id.");this.n--;var e=this.table.get("row_"+t);e.remove(),delete this.list[t],this.button_new.enable(),this._refresh()},hideOptions:function(){this.button_new.$el.hide(),r.each(this.list,function(t){t.hideOperation("button_delete")}),r.isEmpty(this.list)&&this.$el.append(a("
").addClass("ui-form-info").html(this.options.empty_text))},_refresh:function(){var t=0;for(var e in this.list){var i=this.list[e];i.title(++t+": "+this.options.title),this.n>this.options.min?i.showOperation("button_delete"):i.hideOperation("button_delete")}}});return{View:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(4),i(14),i(7),i(9),i(36),i(34),i(35)],s=function(t,e,i,n,s,c,d){var h=o.View.extend({initialize:function(t,i){this.app=t,this.inputs=i.inputs,i.cls="ui-table-plain",i.cls_tr="section-row",this.table=new e.View(i),this.parameters=new d(t,i),this.setElement(this.table.$el),this.render()},render:function(){this.table.delAll();for(var t in this.inputs)this.add(this.inputs[t])},add:function(e){var i=a.extend(!0,{},e);i.id=e.id=t.uid(),this.app.input_list[i.id]=i;var n=i.type;switch(n){case"conditional":this._addConditional(i);break;case"repeat":this._addRepeat(i);break;case"section":this._addSection(i);break;default:this._addRow(i)}},_addConditional:function(t){var e=this;t.test_param.id=t.id,this.app.options.sustain_conditionals&&(t.test_param.disabled=!0);var i=this._addRow(t.test_param);i.model&&i.model.set("onchange",function(i){var n=e.app.data.matchCase(t,i);for(var s in t.cases){var o=t.cases[s],a=t.id+"-section-"+s,r=e.table.get(a),l=!1;for(var c in o.inputs)if(!o.inputs[c].hidden){l=!0;break}s==n&&l?r.fadeIn("fast"):r.hide()}e.app.trigger("change")});for(var n in t.cases){var s=t.id+"-section-"+n,o=new h(this.app,{inputs:t.cases[n].inputs});o.$el.addClass("ui-table-section"),this.table.add(o.$el),this.table.append(s)}i.trigger("change")},_addRepeat:function(t){function e(e){var s=t.id+"-section-"+n++,a=new h(i.app,{inputs:e});o.add({id:s,$el:a.$el,ondel:function(){o.del(s),i.app.trigger("change")}})}for(var i=this,n=0,o=new s.View({title:t.title||"Repeat",title_new:t.title||"",min:t.min,max:t.max,onnew:function(){e(t.inputs),i.app.trigger("change")}}),a=r.size(t.cache),l=0;ll?t.cache[l]:t.inputs);this.app.options.sustain_repeats&&o.hideOptions();var d=new c(this.app,{label:t.title||t.name,help:t.help,field:o});this.table.add(d.$el),this.table.append(t.id)},_addSection:function(t){var e=new n.View({title:t.title||t.name,cls:"ui-portlet-section",collapsible:!0,collapsible_button:!0,collapsed:!t.expanded});e.append(new h(this.app,{inputs:t.inputs}).$el),e.append(l("
").addClass("ui-form-info").html(t.help)),this.app.on("expand",function(t){e.$("#"+t).length>0&&e.expand()}),this.table.add(e.$el),this.table.append(t.id)},_addRow:function(t){var e=t.id,i=this.parameters.create(t);this.app.field_list[e]=i;var n=new c(this.app,{name:t.name,label:t.label||t.name,value:t.value,text_value:t.text_value,collapsible_value:t.collapsible_value,collapsible_preview:t.collapsible_preview,help:t.help,argument:t.argument,disabled:t.disabled,color:t.color,style:t.style,backdrop:t.backdrop,field:i});return this.app.element_list[e]=n,this.table.add(n.$el),this.table.append(e),t.hidden&&this.table.get(e).hide(),i}});return{View:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(9),i(7),i(37),i(33)],s=function(t,e,i,n,s){return o.View.extend({initialize:function(e){this.options=t.merge(e,{initial_errors:!1,cls:"ui-portlet-limited",icon:null}),this.setElement("
"),this.render()},update:function(t){var e=this;this.data.matchModel(t,function(t,i){var n=e.input_list[i];if(n&&n.options&&!a.isEqual(n.options,t.options)){n.options=t.options;var s=e.field_list[i];if(s.update){var o=[];if(-1!=["data","data_collection","drill_down"].indexOf(n.type))o=n.options;else for(var r in t.options){var l=t.options[r];l.length>2&&o.push({label:l[0],value:l[1]})}s.update(o),s.trigger("change"),Galaxy.emit.debug("form-view::update()","Updating options for "+i)}}})},wait:function(t){for(var e in this.input_list){var i=this.field_list[e],n=this.input_list[e];n.is_dynamic&&i.wait&&i.unwait&&(t?i.wait():i.unwait())}},highlight:function(t,e,i){var n=this.element_list[t];if(n&&(n.error(e||"Please verify this parameter."),this.portlet.expand(),this.trigger("expand",t),!i))if(self==top){var s=this.$el.parents().filter(function(){return"auto"==r(this).css("overflow")}).first();s.animate({scrollTop:s.scrollTop()+n.$el.offset().top-50},500)}else r("html, body").animate({scrollTop:n.$el.offset().top-20},500)},errors:function(t){if(this.trigger("reset"),t&&t.errors){var e=this.data.matchResponse(t.errors);for(var i in this.element_list){this.element_list[i];e[i]&&this.highlight(i,e[i],!0)}}},render:function(){var t=this;this.off("change"),this.off("reset"),this.field_list={},this.input_list={},this.element_list={},this.data=new s.Manager(this),this._renderForm(),this.data.create(),this.options.initial_errors&&this.errors(this.options);var e=this.data.checksum();return this.on("change",function(i){var n=t.data.checksum();(n!=e||i)&&(e=n,t.options.onchange&&t.options.onchange())}),this.on("reset",function(){for(var t in this.element_list)this.element_list[t].reset()}),this},_renderForm:function(){this.message=new i.Message,this.section=new n.View(this,{inputs:this.options.inputs}),r(".tooltip").remove(),this.portlet=new e.View({icon:this.options.icon,title:this.options.title,cls:this.options.cls,operations:this.options.operations,buttons:this.options.buttons,collapsible:this.options.collapsible,collapsed:this.options.collapsed}),this.portlet.append(this.message.$el),this.portlet.append(this.section.$el),this.$el.empty(),this.$el.append(this.portlet.$el),this.options.message&&this.message.update({persistent:!0,status:"warning",message:this.options.message}),Galaxy.emit.debug("form-view::initialize()","Completed")}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o){n=[i(30),i(40),i(5)],s=function(t,e,i){"use strict";function n(t){return function(e,i){return this.isNew()&&(i=i||{},i.url=this.urlRoot+this.get("history_id")+"/contents",e=e||{},e.type="dataset_collection"),t.call(this,e,i)}}var s=e.HistoryContentMixin,a=t.ListDatasetCollection,r=t.PairDatasetCollection,l=t.ListPairedDatasetCollection,c=a.extend(s).extend({defaults:o.extend(o.clone(a.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"list",model_class:"HistoryDatasetCollectionAssociation"}),initialize:function(t,e){a.prototype.initialize.call(this,t,e),s.initialize.call(this,t,e)},save:n(a.prototype.save),toString:function(){return["HistoryListDatasetCollection(",this.get("name"),")"].join("")}}),d=r.extend(s).extend({defaults:o.extend(o.clone(r.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"paired",model_class:"HistoryDatasetCollectionAssociation"}),initialize:function(t,e){r.prototype.initialize.call(this,t,e),s.initialize.call(this,t,e)},save:n(r.prototype.save),toString:function(){return["HistoryPairDatasetCollection(",this.get("name"),")"].join("")}}),h=l.extend(s).extend({defaults:o.extend(o.clone(l.prototype.defaults),{history_content_type:"dataset_collection",collection_type:"list:paired",model_class:"HistoryDatasetCollectionAssociation"}),initialize:function(t,e){l.prototype.initialize.call(this,t,e),s.initialize.call(this,t,e)},save:n(l.prototype.save),toString:function(){return["HistoryListPairedDatasetCollection(",this.get("name"),")"].join("")}});return{HistoryListDatasetCollection:c,HistoryPairDatasetCollection:d,HistoryListPairedDatasetCollection:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(10),i(6),i(5)],s=function(t,e,i){"use strict";var n="history",s=function(t,e){return[t,e].join("-")},r={defaults:{history_id:null,history_content_type:null,hid:null,visible:!0},idAttribute:"type_id",constructor:function(t,e){t.type_id=s(t.history_content_type,t.id),this.debug("HistoryContentMixin.constructor:",t.type_id),o.Model.apply(this,arguments)},_typeIdStr:function(){return s(this.get("history_content_type"),this.get("id"))},initialize:function(t,e){this.on("change:id",this._createTypeId)},_createTypeId:function(){this.set("type_id",this._typeIdStr())},isNew:function(){return!this.get("id")},hidden:function(){return!this.get("visible")},isVisible:function(t,e){var i=!0;return t||!this.get("deleted")&&!this.get("purged")||(i=!1),e||this.get("visible")||(i=!1),i},urlRoot:Galaxy.root+"api/histories/",url:function(){var t=this.urlRoot+this.get("history_id")+"/contents/"+this.get("history_content_type")+"s/"+this.get("id");return t},hide:function(t){return this.get("visible")?this.save({visible:!1},t):a.when()},unhide:function(t){return this.get("visible")?a.when():this.save({visible:!0},t)},toString:function(){var t=this.get("id")||"";return this.get("name")&&(t=this.get("hid")+' :"'+this.get("name")+'",'+t),"HistoryContent("+t+")"}},l=o.Model.extend(e.LoggableMixin).extend(r).extend({_logNamespace:n});return{typeIdStr:s,HistoryContentMixin:r,HistoryContent:l}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(40),i(72),i(39),i(10),i(6),i(5)],s=function(t,e,i,n,s,l){"use strict";var c="history",d=o.Collection.extend(s.LoggableMixin).extend({_logNamespace:c,model:function(t,n){if("dataset"===t.history_content_type)return new e.HistoryDatasetAssociation(t,n);if("dataset_collection"===t.history_content_type){switch(t.collection_type){case"list":return new i.HistoryListDatasetCollection(t,n);case"paired":return new i.HistoryPairDatasetCollection(t,n);case"list:paired":return new i.HistoryListPairedDatasetCollection(t,n)}return{validationError:"Unknown collection_type: "+t.history_content_type}}return{validationError:"Unknown history_content_type: "+t.history_content_type}},initialize:function(t,e){e=e||{},this.historyId=e.historyId,this.model.prototype.idAttribute="type_id",this.on("all",function(){this.debug(this+".event:",arguments)})},urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot+"/"+this.historyId+"/contents"},ids:function(){return this.map(function(t){return t.get("id")})},notReady:function(){return this.filter(function(t){return!t.inReadyState()})},running:function(){function t(t){return!t.inReadyState()}return new d(this.filter(t))},getByHid:function(t){return a.first(this.filter(function(e){return e.get("hid")===t}))},getVisible:function(t,e,i){i=i||[],this.debug("checking isVisible");var n=new d(this.filter(function(i){return i.isVisible(t,e)}));return a.each(i,function(t){a.isFunction(t)&&(n=new d(n.filter(t)))}),n},hidden:function(){function t(t){return t.hidden()}return new d(this.filter(t))},deleted:function(){function t(t){return t.get("deleted")}return new d(this.filter(t))},visibleAndUndeleted:function(){function t(t){return t.get("visible")&&!t.get("deleted")}return new d(this.filter(t))},haveDetails:function(){return this.all(function(t){return t.hasDetails()})},fetch:function(t){return t=t||{},t.data=a.defaults(t.data||{},{v:"dev"}),o.Collection.prototype.fetch.call(this,t)},fetchUpdated:function(t,e){return e=e||{},e.traditional=!0,e.data=[{name:"v",value:"dev"}],t&&(e.data=e.data.concat(this._filtersFromMap({"update_time-ge":t.toISOString()}))),e.merge=!0,e.remove=!1,this.fetch(e)},_filtersFromMap:function(t){var e=[];return a.each(t,function(t,i){e.push({name:"q",value:i}),e.push({name:"qv",value:t})}),e},fetchAllDetails:function(t){t=t||{};var e={details:"all"};return t.data=t.data?a.extend(t.data,e):e,this.fetch(t)},fetchCollectionCounts:function(t){return t=t||{},t.data=a.defaults({keys:["type_id","element_count"].join(","),q:"history_content_type",qv:"dataset_collection"},t.data||{}),t.merge=!0,t.remove=!1,this.fetch(t)},ajaxQueue:function(t,e){var i=r.Deferred(),n=this.length,s=[];if(!n)return i.resolve([]),i;var o=this.chain().reverse().map(function(a,r){return function(){var l=t.call(a,e);l.done(function(t){i.notify({curr:r,total:n,
-response:t,model:a})}),l.always(function(t){s.push(t),o.length?o.shift()():i.resolve(s)})}}).value();return o.shift()(),i},isCopyable:function(t){var e=["HistoryDatasetAssociation","HistoryDatasetCollectionAssociation"];return a.isObject(t)&&t.id&&a.contains(e,t.model_class)},copy:function(t){var e,i,n;a.isString(t)?(e=t,n="hda",i="dataset"):(e=t.id,n={HistoryDatasetAssociation:"hda",LibraryDatasetDatasetAssociation:"ldda",HistoryDatasetCollectionAssociation:"hdca"}[t.model_class]||"hda",i="hdca"===n?"dataset_collection":"dataset");var s=this,o=r.post(this.url(),{content:e,source:n,type:i}).done(function(t){s.add([t])}).fail(function(t,a,r){s.trigger("error",s,o,{},"Error copying contents",{type:i,id:e,source:n})});return o},matches:function(t){return this.filter(function(e){return e.matches(t)})},createHDCA:function(t,e,n,s){var o=this,a={list:i.HistoryListDatasetCollection,paired:i.HistoryPairDatasetCollection},r=new a[e]({history_id:this.historyId,name:n,element_identifiers:t});return r.save().done(function(t){o.add(r)}).fail(function(t,e,i){o.trigger("error",t,e,i)})},clone:function(){var t=o.Collection.prototype.clone.call(this);return t.historyId=this.historyId,t},print:function(){var t=this;t.each(function(e){t.debug(e),e.elements&&t.debug(" elements:",e.elements)})},toString:function(){return["HistoryContents(",[this.historyId,this.length].join(),")"].join("")}});return{HistoryContents:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(6),i(5)],s=function(t,e){"use strict";var i="list",n=o.View.extend(t.LoggableMixin).extend({_logNamespace:i,initialize:function(t){this.expanded=t.expanded||!1,this.log(" expanded:",this.expanded),this.fxSpeed=void 0!==t.fxSpeed?t.fxSpeed:this.fxSpeed},fxSpeed:"fast",render:function(t){var e=this._buildNewRender();return this._setUpBehaviors(e),this._queueNewRender(e,t),this},_buildNewRender:function(){var t=a(this.templates.el(this.model.toJSON(),this));return this.expanded&&this.$details(t).replaceWith(this._renderDetails().show()),t},_queueNewRender:function(t,e){e=void 0===e?this.fxSpeed:e;var i=this;a(i).queue("fx",[function(t){this.$el.fadeOut(e,t)},function(e){i._swapNewRender(t),e()},function(t){this.$el.fadeIn(e,t)},function(t){this.trigger("rendered",i),t()}])},_swapNewRender:function(t){return this.$el.empty().attr("class",r.isFunction(this.className)?this.className():this.className).append(t.children())},_setUpBehaviors:function(t){t=t||this.$el,t.find("[title]").tooltip({placement:"bottom"})},$details:function(t){return t=t||this.$el,t.find("> .details")},_renderDetails:function(){var t=a(this.templates.details(this.model.toJSON(),this));return this._setUpBehaviors(t),t},toggleExpanded:function(t){return t=void 0===t?!this.expanded:t,t?this.expand():this.collapse(),this},expand:function(){var t=this;return t._fetchModelDetails().always(function(){t._expand()})},_fetchModelDetails:function(){return this.model.hasDetails()?l.when():this.model.fetch()},_expand:function(){var t=this,e=t._renderDetails();t.$details().replaceWith(e),t.expanded=!0,t.$details().slideDown({duration:t.fxSpeed,step:function(){t.trigger("expanding",t)},complete:function(){t.trigger("expanded",t)}})},collapse:function(){this.debug(this+"(ExpandableView).collapse");var t=this;t.expanded=!1,this.$details().slideUp({duration:t.fxSpeed,step:function(){t.trigger("collapsing",t)},complete:function(){t.trigger("collapsed",t)}})}}),s=n.extend(t.mixin(t.SelectableViewMixin,t.DraggableViewMixin,{tagName:"div",className:"list-item",initialize:function(e){n.prototype.initialize.call(this,e),t.SelectableViewMixin.initialize.call(this,e),t.DraggableViewMixin.initialize.call(this,e),this._setUpListeners()},_setUpListeners:function(){return this.on("selectable",function(t){t?this.$(".primary-actions").hide():this.$(".primary-actions").show()},this),this},_buildNewRender:function(){var t=n.prototype._buildNewRender.call(this);return t.children(".warnings").replaceWith(this._renderWarnings()),t.children(".title-bar").replaceWith(this._renderTitleBar()),t.children(".primary-actions").append(this._renderPrimaryActions()),t.find("> .title-bar .subtitle").replaceWith(this._renderSubtitle()),t},_swapNewRender:function(t){return n.prototype._swapNewRender.call(this,t),this.selectable&&this.showSelector(0),this.draggable&&this.draggableOn(),this.$el},_renderWarnings:function(){var t=this,e=a('
'),i=t.model.toJSON();return r.each(t.templates.warnings,function(n){e.append(a(n(i,t)))}),e},_renderTitleBar:function(){return a(this.templates.titleBar(this.model.toJSON(),this))},_renderPrimaryActions:function(){return[]},_renderSubtitle:function(){return a(this.templates.subtitle(this.model.toJSON(),this))},events:{"click .title-bar":"_clickTitleBar","keydown .title-bar":"_keyDownTitleBar","click .selector":"toggleSelect"},_clickTitleBar:function(t){t.stopPropagation(),t.altKey?(this.toggleSelect(t),this.selectable||this.showSelector()):this.toggleExpanded()},_keyDownTitleBar:function(t){var e=32,i=13;return!t||"keydown"!==t.type||t.keyCode!==e&&t.keyCode!==i?!0:(this.toggleExpanded(),t.stopPropagation(),!1)},toString:function(){var t=this.model?this.model+"":"(no model)";return"ListItemView("+t+")"}}));s.prototype.templates=function(){var e=t.wrapTemplate(['"]),i={},n=t.wrapTemplate(['','
','
','<%- element.name %> ',"
",'
',"
"],"element"),s=t.wrapTemplate(['
']),o=t.wrapTemplate(['
']);return{el:e,warnings:i,titleBar:n,subtitle:s,details:o}}();var c=s.extend({foldoutStyle:"foldout",foldoutPanelClass:null,initialize:function(t){"drilldown"===this.foldoutStyle&&(this.expanded=!1),this.foldoutStyle=t.foldoutStyle||this.foldoutStyle,this.foldoutPanelClass=t.foldoutPanelClass||this.foldoutPanelClass,s.prototype.initialize.call(this,t),this.foldout=this._createFoldoutPanel()},_renderDetails:function(){if("drilldown"===this.foldoutStyle)return a();var t=s.prototype._renderDetails.call(this);return this._attachFoldout(this.foldout,t)},_createFoldoutPanel:function(){var t=this.model,e=this._getFoldoutPanelClass(t),i=this._getFoldoutPanelOptions(t),n=new e(r.extend(i,{model:t}));return n},_getFoldoutPanelClass:function(){return this.foldoutPanelClass},_getFoldoutPanelOptions:function(){return{foldoutStyle:this.foldoutStyle,fxSpeed:this.fxSpeed}},_attachFoldout:function(t,e){return e=e||this.$("> .details"),this.foldout=t.render(0),t.$("> .controls").hide(),e.append(t.$el)},expand:function(){var t=this;return t._fetchModelDetails().always(function(){"foldout"===t.foldoutStyle?t._expand():"drilldown"===t.foldoutStyle&&t._expandByDrilldown()})},_expandByDrilldown:function(){var t=this;t.listenTo(t.foldout,"close",function(){t.trigger("collapsed:drilldown",t,t.foldout)}),t.trigger("expanded:drilldown",t,t.foldout)}});return c.prototype.templates=function(){var e=t.wrapTemplate(['',"
"],"collection");return r.extend({},s.prototype.templates,{details:e})}(),{ExpandableView:n,ListItemView:s,FoldoutListItemView:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(4),i(55),i(7),i(38),i(18),i(28)],s=function(t,e,i,n,s,r){return n.extend({initialize:function(t){var i=this;n.prototype.initialize.call(this,t),this.deferred=new e,t.inputs?this._buildForm(t):this.deferred.execute(function(e){i._buildModel(e,t,!0)})},remove:function(){var t=this;this.$el.hide(),this.deferred.execute(function(){n.prototype.remove.call(t),Galaxy.emit.debug("tool-form-base::remove()","Destroy view.")})},_buildForm:function(e){var i=this;this.options=t.merge(e,this.options),this.options=t.merge({icon:e.icon,title:""+e.name+" "+e.description+" (Galaxy Version "+e.version+")",operations:this._operations(),onchange:function(){i.deferred.reset(),i.deferred.execute(function(t){i._updateModel(t)})}},this.options),this.options.customize&&this.options.customize(this.options),this.render(),this.options.collapsible||this.$el.append(o("
").addClass("ui-margin-top-large").append(this._footer()))},_buildModel:function(e,n,s){var a=this;this.options.id=n.id,this.options.version=n.version;var r="",l={};n.job_id?r=Galaxy.root+"api/jobs/"+n.job_id+"/build_for_rerun":(r=Galaxy.root+"api/tools/"+n.id+"/build",Galaxy.params&&Galaxy.params.tool_id==n.id&&(l=o.extend({},Galaxy.params),n.version&&(l.tool_version=n.version))),t.get({url:r,data:l,success:function(t){return t=t.tool_model||t,t.display?(a._buildForm(t),!s&&a.message.update({status:"success",message:"Now you are using '"+a.options.name+"' version "+a.options.version+", id '"+a.options.id+"'.",persistent:!1}),Galaxy.emit.debug("tool-form-base::initialize()","Initial tool model ready.",t),void e.resolve()):void(window.location=Galaxy.root)},error:function(t,n){var s=t&&t.err_msg||"Uncaught error.";401==n.status?window.location=Galaxy.root+"user/login?"+o.param({redirect:Galaxy.root+"?tool_id="+a.options.id}):a.$el.is(":empty")?a.$el.prepend(new i.Message({message:s,status:"danger",persistent:!0,large:!0}).$el):Galaxy.modal&&Galaxy.modal.show({title:"Tool request failed",body:s,buttons:{Close:function(){Galaxy.modal.hide()}}}),Galaxy.emit.debug("tool-form::initialize()","Initial tool model request failed.",t),e.reject()}})},_updateModel:function(e){var i=this,n=this.options.update_url||Galaxy.root+"api/tools/"+this.options.id+"/build",s={tool_id:this.options.id,tool_version:this.options.version,inputs:o.extend(!0,{},i.data.create())};this.wait(!0),Galaxy.emit.debug("tool-form-base::_updateModel()","Sending current state.",s),t.request({type:"POST",url:n,data:s,success:function(t){i.update(t.tool_model||t),i.options.update&&i.options.update(t),i.wait(!1),Galaxy.emit.debug("tool-form-base::_updateModel()","Received new model.",t),e.resolve()},error:function(t){Galaxy.emit.debug("tool-form-base::_updateModel()","Refresh request failed.",t),e.reject()}})},_operations:function(){var t=this,e=this.options,n=new i.ButtonMenu({icon:"fa-cubes",title:!e.narrow&&"Versions"||null,tooltip:"Select another tool version"});if(!e.sustain_version&&e.versions&&e.versions.length>1)for(var s in e.versions){var o=e.versions[s];o!=e.version&&n.addMenu({title:"Switch to "+o,version:o,icon:"fa-cube",onclick:function(){var i=e.id.replace(e.version,this.version),n=this.version;t.deferred.reset(),t.deferred.execute(function(e){t._buildModel(e,{id:i,version:n})})}})}else n.$el.hide();var a=new i.ButtonMenu({icon:"fa-caret-down",title:!e.narrow&&"Options"||null,tooltip:"View available options"});return e.biostar_url&&(a.addMenu({icon:"fa-question-circle",title:"Question?",tooltip:"Ask a question about this tool (Biostar)",onclick:function(){window.open(e.biostar_url+"/p/new/post/")}}),a.addMenu({icon:"fa-search",title:"Search",tooltip:"Search help for this tool (Biostar)",onclick:function(){window.open(e.biostar_url+"/local/search/page/?q="+e.name)}})),a.addMenu({icon:"fa-share",title:"Share",tooltip:"Share this tool",onclick:function(){prompt("Copy to clipboard: Ctrl+C, Enter",window.location.origin+Galaxy.root+"root?tool_id="+e.id)}}),Galaxy.user&&Galaxy.user.get("is_admin")&&a.addMenu({icon:"fa-download",title:"Download",tooltip:"Download this tool",onclick:function(){window.location.href=Galaxy.root+"api/tools/"+e.id+"/download"}}),e.requirements&&e.requirements.length>0&&a.addMenu({icon:"fa-info-circle",title:"Requirements",tooltip:"Display tool requirements",onclick:function(){!this.visible||t.portlet.collapsed?(this.visible=!0,t.portlet.expand(),t.message.update({persistent:!0,message:t._templateRequirements(e),status:"info"})):(this.visible=!1,t.message.update({message:""}))}}),e.sharable_url&&a.addMenu({icon:"fa-external-link",title:"See in Tool Shed",tooltip:"Access the repository",onclick:function(){window.open(e.sharable_url)}}),{menu:a,versions:n}},_footer:function(){var t=this.options,e=o("
").append(this._templateHelp(t));if(t.citations){var i=o("
"),n=new s.ToolCitationCollection;n.tool_id=t.id;var a=new r.CitationListView({el:i,collection:n});a.render(),n.fetch(),e.append(i)}return e},_templateHelp:function(t){var e=o("
").addClass("ui-form-help").append(t.help);return e.find("a").attr("target","_blank"),e},_templateRequirements:function(t){var e=t.requirements.length;if(e>0){var i="This tool requires ";a.each(t.requirements,function(t,n){i+=t.name+(t.version?" (Version "+t.version+")":"")+(e-2>n?", ":n==e-2?" and ":"")});var n=o(" ").attr("target","_blank").attr("href","https://wiki.galaxyproject.org/Tools/Requirements").text("here");return o(" ").append(i+". Click ").append(n).append(" for more information.")}return"No requirements found."}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(2),i(17),i(12),i(19)],s=function(t,e,i,n){"use strict";var s={hidden:!1,show:function(){this.set("hidden",!1)},hide:function(){this.set("hidden",!0)},toggle:function(){this.set("hidden",!this.get("hidden"))},is_visible:function(){return!this.attributes.hidden}},r=o.Model.extend({defaults:{name:null,label:null,type:null,value:null,html:null,num_samples:5},initialize:function(t){this.attributes.html=unescape(this.attributes.html)},copy:function(){return new r(this.toJSON())},set_value:function(t){this.set("value",t||"")}}),l=o.Collection.extend({model:r}),c=r.extend({}),d=r.extend({set_value:function(t){this.set("value",parseInt(t,10))},get_samples:function(){return d3.scale.linear().domain([this.get("min"),this.get("max")]).ticks(this.get("num_samples"))}}),h=d.extend({set_value:function(t){this.set("value",parseFloat(t))}}),u=r.extend({get_samples:function(){return t.map(this.get("options"),function(t){return t[0]})}});r.subModelTypes={integer:d,"float":h,data:c,select:u};var p=o.Model.extend({defaults:{id:null,name:null,description:null,target:null,inputs:[],outputs:[]},urlRoot:Galaxy.root+"api/tools",initialize:function(e){this.set("inputs",new l(t.map(e.inputs,function(t){var e=r.subModelTypes[t.type]||r;return new e(t)})))},toJSON:function(){var t=o.Model.prototype.toJSON.call(this);return t.inputs=this.get("inputs").map(function(t){return t.toJSON()}),t},remove_inputs:function(t){var e=this,i=e.get("inputs").filter(function(e){return-1!==t.indexOf(e.get("type"))});e.get("inputs").remove(i)},copy:function(t){var e=new p(this.toJSON());if(t){var i=new o.Collection;e.get("inputs").each(function(t){t.get_samples()&&i.push(t)}),e.set("inputs",i)}return e},apply_search_results:function(e){return-1!==t.indexOf(e,this.attributes.id)?this.show():this.hide(),this.is_visible()},set_input_value:function(t,e){this.get("inputs").find(function(e){return e.get("name")===t}).set("value",e)},set_input_values:function(e){var i=this;t.each(t.keys(e),function(t){i.set_input_value(t,e[t])})},run:function(){return this._run()},rerun:function(t,e){return this._run({action:"rerun",target_dataset_id:t.id,regions:e})},get_inputs_dict:function(){var t={};return this.get("inputs").each(function(e){t[e.get("name")]=e.get("value")}),t},_run:function(n){var s=t.extend({tool_id:this.id,inputs:this.get_inputs_dict()},n),o=a.Deferred(),r=new e.ServerStateDeferred({ajax_settings:{url:this.urlRoot,data:JSON.stringify(s),dataType:"json",contentType:"application/json",type:"POST"},interval:2e3,success_fn:function(t){return"pending"!==t}});return a.when(r.go()).then(function(t){o.resolve(new i.DatasetCollection(t))}),o}});t.extend(p.prototype,s);var g=(o.View.extend({}),o.Collection.extend({model:p})),f=o.Model.extend(s),m=o.Model.extend({defaults:{elems:[],open:!1},clear_search_results:function(){t.each(this.attributes.elems,function(t){t.show()}),this.show(),this.set("open",!1)},apply_search_results:function(e){var i,n=!0;t.each(this.attributes.elems,function(t){t instanceof f?(i=t,i.hide()):t instanceof p&&t.apply_search_results(e)&&(n=!1,i&&i.show())}),n?this.hide():(this.show(),this.set("open",!0))}});t.extend(m.prototype,s);var v=o.Model.extend({defaults:{search_hint_string:"search tools",min_chars_for_search:3,clear_btn_url:"",search_url:"",visible:!0,query:"",results:null,clear_key:27},urlRoot:Galaxy.root+"api/tools",initialize:function(){this.on("change:query",this.do_search)},do_search:function(){var t=this.attributes.query;if(t.length");if(t.append(S.tool_link(this.model.toJSON())),"upload1"===this.model.id)t.find("a").on("click",function(t){t.preventDefault(),Galaxy.upload.show()});else if("Tool"===this.model.get("model_class")){var e=this;t.find("a").on("click",function(t){t.preventDefault();var i=new n.View({id:e.model.id,version:e.model.get("version")});i.deferred.execute(function(){Galaxy.app.display(i)})})}return this.$el.append(t),this}}),w=y.extend({tagName:"div",className:"toolPanelLabel",render:function(){return this.$el.append(a(" ").text(this.model.attributes.text)),this}}),x=y.extend({tagName:"div",className:"toolSectionWrapper",initialize:function(){y.prototype.initialize.call(this),this.model.on("change:open",this.update_open,this)},render:function(){this.$el.append(S.panel_section(this.model.toJSON()));var e=this.$el.find(".toolSectionBody");return t.each(this.model.attributes.elems,function(t){if(t instanceof p){var i=new b({model:t,className:"toolTitle"});i.render(),e.append(i.$el)}else if(t instanceof f){var n=new w({model:t});n.render(),e.append(n.$el)}}),this},events:{"click .toolSectionTitle > a":"toggle"},toggle:function(){this.model.set("open",!this.model.attributes.open)},update_open:function(){this.model.attributes.open?this.$el.children(".toolSectionBody").slideDown("fast"):this.$el.children(".toolSectionBody").slideUp("fast")}}),C=o.View.extend({tagName:"div",id:"tool-search",className:"bar",events:{click:"focus_and_select","keyup :input":"query_changed","click #search-clear-btn":"clear"},render:function(){return this.$el.append(S.tool_search(this.model.toJSON())),this.model.is_visible()||this.$el.hide(),this.$el.find("[title]").tooltip(),this},focus_and_select:function(){this.$el.find(":input").focus().select()},clear:function(){return this.model.clear_search(),this.$el.find(":input").val(""),this.focus_and_select(),!1},query_changed:function(t){return this.model.attributes.clear_key&&this.model.attributes.clear_key===t.which?(this.clear(),!1):void this.model.set("query",this.$el.find(":input").val())}}),$=o.View.extend({tagName:"div",className:"toolMenu",initialize:function(){this.model.get("tool_search").on("change:results",this.handle_search_results,this)},render:function(){var t=this,e=new C({model:this.model.get("tool_search")});return e.render(),t.$el.append(e.$el),this.model.get("layout").each(function(e){if(e instanceof m){var i=new x({model:e});i.render(),t.$el.append(i.$el)}else if(e instanceof p){var n=new b({model:e,className:"toolTitleNoSection"});n.render(),t.$el.append(n.$el)}else if(e instanceof f){var s=new w({model:e});s.render(),t.$el.append(s.$el)}}),t.$el.find("a.tool-link").click(function(e){var i=a(this).attr("class").split(/\s+/)[0],n=t.model.get("tools").get(i);t.trigger("tool_link_click",e,n)}),this},handle_search_results:function(){var t=this.model.get("tool_search").get("results");t&&0===t.length?a("#search-no-results").show():a("#search-no-results").hide()}}),E=o.View.extend({className:"toolForm",render:function(){this.$el.children().remove(),this.$el.append(S.tool_form(this.model.toJSON()))}}),S=(o.View.extend({className:"toolMenuAndView",initialize:function(){this.tool_panel_view=new $({collection:this.collection}),this.tool_form_view=new E},render:function(){this.tool_panel_view.render(),this.tool_panel_view.$el.css("float","left"),this.$el.append(this.tool_panel_view.$el),this.tool_form_view.$el.hide(),this.$el.append(this.tool_form_view.$el);var t=this;this.tool_panel_view.on("tool_link_click",function(e,i){e.preventDefault(),t.show_tool(i)})},show_tool:function(t){var e=this;t.fetch().done(function(){e.tool_form_view.model=t,e.tool_form_view.render(),e.tool_form_view.$el.show(),a("#left").width("650px")})}}),{tool_search:t.template([' " autocomplete="off" type="text" />',' ',' '].join("")),panel_section:t.template(['",'','
',"
"].join("")),tool_link:t.template(['
',"<% _.each( labels, function( label ){ %>",'',"<%- label %>"," ","<% }); %>"," ",'
',"<%- name %>"," "," <%- description %>"].join("")),tool_form:t.template(['
<%- tool.name %> (version <%- tool.version %>)
','
',"<% _.each( tool.inputs, function( input ){ %>",'
","<% }); %>","
",'
',' ',"
",'
"].join(""),{variable:"tool"})});return{ToolParameter:r,IntegerToolParameter:d,SelectToolParameter:u,Tool:p,ToolCollection:g,ToolSearch:v,ToolPanel:_,ToolPanelView:$,ToolFormView:E}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,function(t,e,i){var n,s;(function(i,o,a,r){n=[],s=function(){var t=i.View.extend({initialize:function(t,e){this.$button=t,this.$button.length||(this.$button=o("
")),this.options=e||[],this.$button.data("popupmenu",this);var i=this;this.$button.click(function(t){return o(".popmenu-wrapper").remove(),i._renderAndShow(t),!1})},_renderAndShow:function(t){this.render(),this.$el.appendTo("body").css(this._getShownPosition(t)).show(),this._setUpCloseBehavior()},render:function(){if(this.$el.addClass("popmenu-wrapper").hide().css({position:"absolute"}).html(this.template(this.$button.attr("id"),this.options)),this.options.length){var t=this;this.$el.find("li").each(function(e,i){var n=t.options[e];n.func&&o(this).children("a.popupmenu-option").click(function(e){n.func.call(t,e,n),e.preventDefault()})})}return this},template:function(t,e){return['"].join("")},_templateOptions:function(t){return t.length?a.map(t,function(t){if(t.divider)return'
';if(t.header)return['
',t.html," "].join("");var e=t.href||"javascript:void(0);",i=t.target?' target="'+t.target+'"':"",n=t.checked?'
':"";return['
"].join("")}).join(""):"
(no options) "},_getShownPosition:function(t){var e=this.$el.width(),i=t.pageX-e/2;return i=Math.min(i,o(document).scrollLeft()+o(window).width()-e-5),i=Math.max(i,o(document).scrollLeft()+5),{top:t.pageY,left:i}},_setUpCloseBehavior:function(){function t(t){if(o(document).off("click.close_popup"),window&&window.parent!==window)try{o(window.parent.document).off("click.close_popup")}catch(i){}else try{o("iframe#galaxy_main").contents().off("click.close_popup")}catch(i){}e.remove()}var e=this;if(o("html").one("click.close_popup",t),window&&window.parent!==window)try{o(window.parent.document).find("html").one("click.close_popup",t)}catch(i){}else try{o("iframe#galaxy_main").contents().one("click.close_popup",t)}catch(i){}},addItem:function(t,e){return e=e>=0?e:this.options.length,this.options.splice(e,0,t),this},removeItem:function(t){return t>=0&&this.options.splice(t,1),this},findIndexByHtml:function(t){for(var e=0;e
'},_templateContent:function(){return'
'},_templateBox:function(t){return'
'},_template:function(){return'
'}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,n){var s,o;(function(a,r){s=[n(4),n(21)],o=function(t,e){var n=e.BaseIcons.extend({initialize:function(t){t.type=t.display||"checkbox",t.multiple="checkbox"==t.type,e.BaseIcons.prototype.initialize.call(this,t)},_setValue:function(t){if(e.BaseIcons.prototype._setValue.call(this,t),void 0!==t&&null!==t&&this.header_index){var i=this,n=a.isArray(t)?t:[t];r.each(n,function(t){var e=i.header_index[t];r.each(e,function(t){i._setState(t,!0)})})}},_setState:function(t,e){var i=this.$(".button-"+t),n=this.$(".subgroup-"+t);i.data("is_expanded",e),e?(n.show(),i.removeClass("fa-plus-square").addClass("fa-minus-square")):(n.hide(),i.removeClass("fa-minus-square").addClass("fa-plus-square"))},_templateOptions:function(){function e(t,e){var i=t.find(".button-"+e);i.on("click",function(){s._setState(e,!i.data("is_expanded"))})}function n(o,r,l){l=l||[];for(i in r){var c=r[i],d=c.options&&c.options.length>0,h=l.slice(0);s.header_index[c.value]=h.slice(0);var u=a("
");if(d){var p=t.uid(),g=a("
").addClass("button-"+p).addClass("ui-drilldown-button fa fa-plus-square"),f=a("
").addClass("subgroup-"+p).addClass("ui-drilldown-subgroup");
-u.append(a("
").append(g).append(s._templateOption({label:c.name,value:c.value}))),h.push(p),n(f,c.options,h),u.append(f),e(u,p)}else u.append(s._templateOption({label:c.name,value:c.value}));o.append(u)}}var s=this;this.header_index={};var o=a("
");return n(o,this.model.get("data")),o},_template:function(){return a("
").addClass("ui-options-list drilldown-container").attr("id",this.model.id)}});return{View:n}}.apply(e,s),!(void 0!==o&&(t.exports=o))}).call(e,n(1),n(2))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4),i(7),i(22)],s=function(t,e,i){var n={DISABLED:"disabled",ENABLED:"enabled",LINKED:"linked"},s={data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:n.DISABLED},{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.LINKED},{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.LINKED}],data_multiple:[{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.DISABLED},{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED}],data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED}],workflow_data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:n.DISABLED}],workflow_data_multiple:[{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.DISABLED}],workflow_data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED}],module_data:[{src:"hda",icon:"fa-file-o",tooltip:"Single dataset",multiple:!1,batch:n.DISABLED},{src:"hda",icon:"fa-files-o",tooltip:"Multiple datasets",multiple:!0,batch:n.ENABLED}],module_data_collection:[{src:"hdca",icon:"fa-folder-o",tooltip:"Dataset collection",multiple:!1,batch:n.DISABLED},{src:"hdca",icon:"fa-folder",tooltip:"Multiple collections",multiple:!0,batch:n.ENABLED}]},l=o.View.extend({initialize:function(t){var i=this;this.model=t&&t.model||new o.Model({src_labels:{hda:"dataset",hdca:"dataset collection"}}).set(t),this.setElement(a("
").addClass("ui-select-content")),this.button_product=new e.RadioButton.View({value:"true",data:[{icon:"fa fa-chain",value:"true",tooltip:"Linked inputs will be run in matched order with other datasets e.g. use this for matching forward and reverse reads."},{icon:"fa fa-chain-broken",value:"false",tooltip:"Unlinked dataset inputs will be run against *all* other inputs."}]});var n=a("
").addClass("ui-form-info").append(a("
").addClass("fa fa-sitemap")).append(a("
").html("This is a batch mode input field. Separate jobs will be triggered for each dataset selection."));this.$batch={linked:n.clone(),enabled:n.clone().append(a("
").append(a("
").addClass("ui-form-title").html("Batch options:")).append(this.button_product.$el)).append(a("
").css("clear","both"))},this.history={},this.listenTo(this.model,"change:data",this._changeData,this),this.listenTo(this.model,"change:wait",this._changeWait,this),this.listenTo(this.model,"change:current",this._changeCurrent,this),this.listenTo(this.model,"change:value",this._changeValue,this),this.listenTo(this.model,"change:type change:optional change:multiple change:extensions",this._changeType,this),this.render(),this.on("change",function(){t.onchange&&t.onchange(i.value())})},render:function(){this._changeType(),this._changeValue(),this._changeWait()},wait:function(){this.model.set("wait",!0)},unwait:function(){this.model.set("wait",!1)},update:function(t){this.model.set("data",t)},value:function(t){void 0!==t&&this.model.set("value",t);var e=this.model.get("current");if(this.config[e]){var i=this.fields[e].value();if(null!==i&&(i=a.isArray(i)?i:[i],i.length>0)){var n=this._batch({values:[]});for(var s in i){var o=this.history[i[s]+"_"+this.config[e].src];if(!o)return Galaxy.emit.debug("ui-select-content::value()","Requested details not found for '"+i[s]+"'."),null;n.values.push(o)}return n.values.sort(function(t,e){return t.hid-e.hid}),n}}else Galaxy.emit.debug("ui-select-content::value()","Invalid value/source '"+t+"'.");return null},_changeCurrent:function(){var t=this;r.each(this.fields,function(e,i){t.model.get("current")==i?(e.$el.show(),r.each(t.$batch,function(e,n){e[t.config[i].batch==n?"show":"hide"]()}),t.button_type.value(i)):e.$el.hide()})},_changeType:function(){var n=this,o=(this.model.get("flavor")?this.model.get("flavor")+"_":"")+String(this.model.get("type"))+(this.model.get("multiple")?"_multiple":"");s[o]?this.config=s[o]:(this.config=s.data,Galaxy.emit.debug("ui-select-content::_changeType()","Invalid configuration/type id '"+o+"'."));var a=t.textify(this.model.get("extensions")),l=this.model.get("src_labels");this.fields=[],this.button_data=[],r.each(this.config,function(t,e){n.button_data.push({value:e,icon:t.icon,tooltip:t.tooltip}),n.fields.push(new i.View({optional:n.model.get("optional"),multiple:t.multiple,searchable:!t.multiple,error_text:"No "+(a?a+" ":"")+(l[t.src]||"content")+" available.",onchange:function(){n.trigger("change")}}))}),this.button_type=new e.RadioButton.View({value:this.model.get("current"),data:this.button_data,onchange:function(t){n.model.set("current",t),n.trigger("change")}}),this.$el.empty();var c=0;this.fields.length>1&&(this.$el.append(this.button_type.$el),c=Math.max(0,35*this.fields.length)+"px"),r.each(this.fields,function(t){n.$el.append(t.$el.css({"margin-left":c}))}),r.each(this.$batch,function(t,e){n.$el.append(t.css({"margin-left":c}))}),this.model.set("current",0),this._changeCurrent(),this._changeData()},_changeWait:function(){var t=this;r.each(this.fields,function(e){e[t.model.get("wait")?"wait":"unwait"]()})},_changeData:function(){var t=this.model.get("data"),e=this,i={};r.each(t,function(t,n){i[n]=[],r.each(t,function(t){i[n].push({hid:t.hid,label:t.hid+": "+t.name,value:t.id}),e.history[t.id+"_"+n]=t})}),r.each(this.config,function(t,n){i[t.src]&&e.fields[n].add(i[t.src],function(t,e){return e.hid-t.hid})})},_changeValue:function(){var t=this.model.get("value");if(t&&t.values&&t.values.length>0){var e=[];r.each(t.values,function(t){e.push(t.id)});for(var i=t.values[0].src,n=t.values.length>1,s=0;s
Select Library
'}});return{View:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){var e=o.View.extend({initialize:function(e){var i=this;this.options=t.merge(e,{id:t.uid(),min:null,max:null,step:null,precise:!1,split:1e4}),this.setElement(this._template(this.options)),this.useslider=null!==this.options.max&&null!==this.options.min&&this.options.max>this.options.min,null===this.options.step&&(this.options.step=1,this.options.precise&&this.useslider&&(this.options.step=(this.options.max-this.options.min)/this.options.split)),this.useslider?(this.$slider=this.$("#slider"),this.$slider.slider(this.options),this.$slider.on("slide",function(t,e){i.value(e.value)})):this.$(".ui-form-slider-text").css("width","100%"),this.$text=this.$("#text"),void 0!==this.options.value&&this.value(this.options.value);var n=[];this.$text.on("change",function(){i.value(a(this).val())}),this.$text.on("keyup",function(t){n[t.which]=!1,i.options.onchange&&i.options.onchange(a(this).val())}),this.$text.on("keydown",function(t){var e=t.which;n[e]=!0,i.options.is_workflow&&n[16]&&52==e?(i.value("$"),event.preventDefault()):8==e||9==e||13==e||37==e||39==e||e>=48&&57>=e&&!n[16]||e>=96&&105>=e||(190==e||110==e)&&-1==a(this).val().indexOf(".")&&i.options.precise||(189==e||109==e)&&-1==a(this).val().indexOf("-")||i._isParameter(a(this).val())||n[91]||n[17]||event.preventDefault()})},value:function(t){return void 0!==t&&(null===t||""===t||this._isParameter(t)||(isNaN(t)&&(t=0),null!==this.options.max&&(t=Math.min(t,this.options.max)),null!==this.options.min&&(t=Math.max(t,this.options.min))),this.$slider&&this.$slider.slider("value",t),this.$text.val(t),this.options.onchange&&this.options.onchange(t)),this.$text.val()},_isParameter:function(t){return this.options.is_workflow&&"$"===String(t).substring(0,1)},_template:function(t){return'
'}});return{View:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(i){n=[],s=function(){var t=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(t){this.clear().set(this.defaults).set(t)}}),e=i.Collection.extend({model:t});return{Model:t,Collection:e}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3))},,function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){return o.Model.extend({initialize:function(){this.active={},this.last=null},execute:function(e){var i=this,n=t.uid(),s=e.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),e(o),!s&&o.resolve()):o.reject()}),this.last=o.promise()},reset:function(){Galaxy.emit.debug("deferred::execute()","Reset");for(var t in this.active)this.active[t]=!1},ready:function(){return a.isEmptyObject(this.active)}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},,,,,,,,,,,,function(t,e,i){var n,s;(function(o,a){n=[i(6),i(5),i(16)],s=function(t,e){var i=o.View.extend(t.LoggableMixin).extend(t.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"annotation-display",initialize:function(t){t=t||{},this.tooltipConfig=t.tooltipConfig||{placement:"bottom"},this.listenTo(this.model,"change:annotation",function(){this.render()}),this.hiddenUntilActivated(t.$activator,t)},render:function(){var t=this;return this.$el.html(this._template()),this.$el.find("[title]").tooltip(this.tooltipConfig),this.$annotation().make_text_editable({use_textarea:!0,on_finish:function(e){t.$annotation().text(e),t.model.save({annotation:e},{silent:!0}).fail(function(){t.$annotation().text(t.model.previous("annotation"))})}}),this},_template:function(){var t=this.model.get("annotation");return['
',e("Annotation")," ",'
',a.escape(t),"
"].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(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2))},function(t,e,i){var n,s;(function(o){n=[i(75),i(30),i(29),i(6),i(5)],s=function(t,e,i,n,s){"use strict";var a="collections",r=t.ModelListPanel,l=r.extend({_logNamespace:a,className:r.prototype.className+" dataset-collection-panel",DatasetDCEViewClass:i.DatasetDCEListItemView,NestedDCDCEViewClass:i.NestedDCDCEListItemView,modelCollectionKey:"elements",initialize:function(t){r.prototype.initialize.call(this,t),this.linkTarget=t.linkTarget||"_blank",this.hasUser=t.hasUser,this.panelStack=[],this.parentName=t.parentName,this.foldoutStyle=t.foldoutStyle||"foldout"},_filterCollection:function(){return this.model.getVisibleContents()},_getItemViewClass:function(t){switch(t.get("element_type")){case"hda":return this.DatasetDCEViewClass;case"dataset_collection":return this.NestedDCDCEViewClass}throw new TypeError("Unknown element type:",t.get("element_type"))},_getItemViewOptions:function(t){var e=r.prototype._getItemViewOptions.call(this,t);return o.extend(e,{linkTarget:this.linkTarget,hasUser:this.hasUser,foldoutStyle:this.foldoutStyle})},_setUpItemViewListeners:function(t){var e=this;return r.prototype._setUpItemViewListeners.call(e,t),e.listenTo(t,{"expanded:drilldown":function(t,e){this._expandDrilldownPanel(e)},"collapsed:drilldown":function(t,e){this._collapseDrilldownPanel(e)}}),this},_expandDrilldownPanel:function(t){this.panelStack.push(t),this.$("> .controls").add(this.$list()).hide(),t.parentName=this.model.get("name"),this.$el.append(t.render().$el)},_collapseDrilldownPanel:function(t){this.panelStack.pop(),this.render()},events:{"click .navigation .back":"close"},close:function(t){this.$el.remove(),this.trigger("close")},toString:function(){return"CollectionView("+(this.model?this.model.get("name"):"")+")"}});l.prototype.templates=function(){var t=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"),"<% } %>","
","
","
"],"collection");return o.extend(o.clone(r.prototype.templates),{controls:t})}();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"):"")+")"}});return{CollectionView:l,ListCollectionView:c,PairCollectionView:d,ListOfPairsCollectionView:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(10),i(32),i(76),i(67),i(23),i(6),i(5)],s=function(t,e,n,s,r,l,c){"use strict";var d=e.DatasetListItemView,h=d.extend({initialize:function(t){d.prototype.initialize.call(this,t),this.hasUser=t.hasUser,this.purgeAllowed=t.purgeAllowed||!1,this.tagsEditorShown=t.tagsEditorShown||!1,this.annotationEditorShown=t.annotationEditorShown||!1},_renderPrimaryActions:function(){var e=d.prototype._renderPrimaryActions.call(this);return this.model.get("state")===t.NOT_VIEWABLE?e:d.prototype._renderPrimaryActions.call(this).concat([this._renderEditButton(),this._renderDeleteButton()])},_renderEditButton:function(){if(this.model.get("state")===t.DISCARDED||!this.model.get("accessible"))return null;var e=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||e?(n.disabled=!0,e?n.title=c("Cannot edit attributes of datasets removed from disk"):i&&(n.title=c("Undelete dataset to edit attributes"))):o.contains([t.UPLOAD,t.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 t=this,e=this.model.isDeletedOrPurged();return r({title:c(e?"Dataset is already deleted":"Delete"),disabled:e,faIcon:"fa-times",classes:"delete-btn",onclick:function(){t.$el.find(".icon-btn.delete-btn").trigger("mouseout"),t.model["delete"]()}})},_renderDetails:function(){var e=d.prototype._renderDetails.call(this),i=this.model.get("state");return!this.model.isDeletedOrPurged()&&o.contains([t.OK,t.FAILED_METADATA],i)&&(this._renderTags(e),this._renderAnnotation(e),this._makeDbkeyEditLink(e)),this._setUpBehaviors(e),e},_renderSecondaryActions:function(){var e=d.prototype._renderSecondaryActions.call(this);switch(this.model.get("state")){case t.UPLOAD:case t.NOT_VIEWABLE:return e;case t.ERROR:return e.unshift(this._renderErrButton()),e.concat([this._renderRerunButton()]);case t.OK:case t.FAILED_METADATA:return e.concat([this._renderRerunButton(),this._renderVisualizationsButton()])}return e.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 t=this.model.get("creating_job");return this.model.get("rerunnable")?r({title:c("Run this job again"),href:this.model.urls.rerun,classes:"rerun-btn",target:this.linkTarget,faIcon:"fa-refresh",onclick:function(e){e.preventDefault(),!function(){var e=[i(19)];(function(e){var i=new e.View({job_id:t});i.deferred.execute(function(){Galaxy.app.display(i)})}).apply(null,e)}()}}):void 0},_renderVisualizationsButton:function(){var t=this.model.get("visualizations");if(this.model.isDeletedOrPurged()||!this.hasUser||!this.model.hasData()||o.isEmpty(t))return null;if(!o.isObject(t[0]))return this.warn("Visualizations have been switched off"),null;var e=a(this.templates.visualizations(t,this));return e.find('[target="galaxy_main"]').attr("target",this.linkTarget),this._addScratchBookFn(e.find(".visualization-link").addBack(".visualization-link")),e},_addScratchBookFn:function(t){t.click(function(t){Galaxy.frame&&Galaxy.frame.active&&(Galaxy.frame.add({title:"Visualization",url:a(this).attr("href")}),t.preventDefault(),t.stopPropagation())})},_renderTags:function(t){if(this.hasUser){var e=this;this.tagsEditor=new n.TagsEditor({model:this.model,el:t.find(".tags-display"),onshowFirstTime:function(){this.render()},onshow:function(){e.tagsEditorShown=!0},onhide:function(){e.tagsEditorShown=!1},$activator:r({title:c("Edit dataset tags"),classes:"tag-btn",faIcon:"fa-tags"}).appendTo(t.find(".actions .right"))}),this.tagsEditorShown&&this.tagsEditor.toggle(!0)}},_renderAnnotation:function(t){if(this.hasUser){var e=this;this.annotationEditor=new s.AnnotationEditor({model:this.model,el:t.find(".annotation-display"),onshowFirstTime:function(){this.render()},onshow:function(){e.annotationEditorShown=!0},onhide:function(){e.annotationEditorShown=!1},$activator:r({title:c("Edit dataset annotation"),classes:"annotate-btn",faIcon:"fa-comment"}).appendTo(t.find(".actions .right"))}),this.annotationEditorShown&&this.annotationEditor.toggle(!0)}},_makeDbkeyEditLink:function(t){if("?"===this.model.get("metadata_dbkey")&&!this.model.isDeletedOrPurged()){var e=a('
? ').attr("href",this.model.urls.edit).attr("target",this.linkTarget);t.find(".dbkey .value").replaceWith(e)}},events:o.extend(o.clone(d.prototype.events),{"click .undelete-link":"_clickUndeleteLink","click .purge-link":"_clickPurgeLink","click .edit-btn":function(t){this.trigger("edit",this,t)},"click .delete-btn":function(t){this.trigger("delete",this,t)},"click .rerun-btn":function(t){this.trigger("rerun",this,t)},"click .report-err-btn":function(t){this.trigger("report-err",this,t)},"click .visualization-btn":function(t){this.trigger("visualize",this,t)},"click .dbkey a":function(t){this.trigger("edit",this,t)}}),_clickUndeleteLink:function(t){return this.model.undelete(),!1},_clickPurgeLink:function(t){return this.model.purge(),!1},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDAEditView("+t+")"}});return h.prototype.templates=function(){var t=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")}),e=l.wrapTemplate(["<% if( visualizations.length === 1 ){ %>",'
">',' '," ","<% } else { %>",'
","<% } %>"],"visualizations");return o.extend({},d.prototype.templates,{warnings:t,visualizations:e})}(),{DatasetListItemEdit:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(10),i(6),i(5)],s=function(t,e,i){"use strict";var n="dataset",s=e.SearchableModelMixin,l=o.Model.extend(e.LoggableMixin).extend(e.mixin(s,{_logNamespace:n,defaults:{state:t.NEW,deleted:!1,purged:!1,name:"(unnamed dataset)",accessible:!0,data_type:"",file_ext:"",file_size:0,meta_files:[],misc_blurb:"",misc_info:"",tags:[]},initialize:function(e,i){this.debug(this+"(Dataset).initialize",e,i),this.get("accessible")||this.set("state",t.NOT_VIEWABLE),this.urls=this._generateUrls(),this._setUpListeners()},_generateUrls:function(){var t=this.get("id");if(!t)return{};var e={purge:"datasets/"+t+"/purge_async",display:"datasets/"+t+"/display/?preview=True",edit:"datasets/"+t+"/edit",download:"datasets/"+t+"/display?to_ext="+this.get("file_ext"),report_error:"dataset/errors?id="+t,rerun:"tool_runner/rerun?id="+t,show_params:"datasets/"+t+"/show_params",visualization:"visualization",meta_download:"dataset/get_metadata_file?hda_id="+t+"&metadata_name="};return a.each(e,function(t,i){e[i]=Galaxy.root+t}),this.urls=e,e},_setUpListeners:function(){this.on("change:state",function(t,e){this.log(this+" has changed state:",t,e),this.inReadyState()&&this.trigger("state:ready",t,e,this.previous("state"))}),this.on("change:id change:file_ext",function(t){this._generateUrls()})},toJSON:function(){var t=o.Model.prototype.toJSON.call(this);return a.extend(t,{urls:this.urls})},isDeletedOrPurged:function(){return this.get("deleted")||this.get("purged")},inReadyState:function(){var e=a.contains(t.READY_STATES,this.get("state"));return this.isDeletedOrPurged()||e},hasDetails:function(){return this.get("accessible")?a.has(this.attributes,"genome_build"):!0},hasData:function(){return this.get("file_size")>0},fetch:function(t){var e=this;return o.Model.prototype.fetch.call(this,t).always(function(){e._generateUrls()})},"delete":function(t){return this.get("deleted")?r.when():this.save({deleted:!0},t)},undelete:function(t){return!this.get("deleted")||this.get("purged")?r.when():this.save({deleted:!1},t)},purge:function(t){if(this.get("purged"))return r.when();t=t||{},t.url=this.urls.purge;var e=this,n=r.ajax(t);return n.done(function(t,i,n){e.set({deleted:!0,purged:!0})}),n.fail(function(n,s,o){var a=i("Unable to purge dataset"),r="Removal of datasets by users is not allowed in this Galaxy instance";n.responseJSON&&n.responseJSON.error?a=n.responseJSON.error:-1!==n.responseText.indexOf(r)&&(a=r),n.responseText=a,e.trigger("error",e,n,t,i(a),{error:a})}),n},searchAttributes:["name","file_ext","genome_build","misc_blurb","misc_info","annotation","tags"],searchAliases:{title:"name",format:"file_ext",database:"genome_build",blurb:"misc_blurb",description:"misc_blurb",info:"misc_info",tag:"tags"},toString:function(){var t=this.get("id")||"";return this.get("name")&&(t='"'+this.get("name")+'",'+t),"Dataset("+t+")"}})),c=o.Collection.extend(e.LoggableMixin).extend({_logNamespace:n,model:l,urlRoot:Galaxy.root+"api/datasets",url:function(){return this.urlRoot},ids:function(){return this.map(function(t){return t.get("id")})},notReady:function(){return this.filter(function(t){return!t.inReadyState()})},haveDetails:function(){return this.all(function(t){return t.hasDetails()})},ajaxQueue:function(t,e){var i=r.Deferred(),n=this.length,s=[];if(!n)return i.resolve([]),i;var o=this.chain().reverse().map(function(a,r){return function(){var l=t.call(a,e);l.done(function(t){i.notify({curr:r,total:n,response:t,model:a})}),l.always(function(t){s.push(t),o.length?o.shift()():i.resolve(s)})}}).value();return o.shift()(),i},matches:function(t){return this.filter(function(e){return e.matches(t)})},toString:function(){return["DatasetAssociationCollection(",this.length,")"].join("")}});return{DatasetAssociation:l,DatasetAssociationCollection:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o){n=[i(32),i(6),i(5)],s=function(t,e,i){"use strict";var n=t.DatasetListItemView,s=n.extend({className:n.prototype.className+" history-content",initialize:function(t,e){n.prototype.initialize.call(this,t,e)},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDAListItemView("+t+")"}});return s.prototype.templates=function(){var t=e.wrapTemplate(['
','
','
','<%- dataset.hid %> ','<%- dataset.name %> ',"
","
"],"dataset"),s=o.extend({},n.prototype.templates.warnings,{hidden:e.wrapTemplate(["<% if( !dataset.visible ){ %>",'
',i("This dataset has been hidden"),"
","<% } %>"],"dataset")});return o.extend({},n.prototype.templates,{titleBar:t,warnings:s})}(),{HDAListItemView:s}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o){n=[i(70),i(40),i(6),i(5)],s=function(t,e,i,n){"use strict";var s=t.DatasetAssociation,a=e.HistoryContentMixin,r=s.extend(i.mixin(a,{constructor:function(t,e){a.constructor.call(this,t,e)},defaults:o.extend({},s.prototype.defaults,a.defaults,{model_class:"HistoryDatasetAssociation"}),initialize:function(t,e){s.prototype.initialize.call(this,t,e),a.initialize.call(this,t,e)},toString:function(){var t=this.get("id")||"";return this.get("name")&&(t=this.get("hid")+' :"'+this.get("name")+'",'+t),"HDA("+t+")"}}));return{HistoryDatasetAssociation:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o){n=[i(10),i(29),i(68),i(6),i(5)],s=function(t,e,i,n,s){"use strict";var a=e.DCListItemView,r=a.extend({className:a.prototype.className+" history-content",_setUpListeners:function(){a.prototype._setUpListeners.call(this),this.listenTo(this.model,{"change:populated change:visible":function(t,e){this.render()}})},_getFoldoutPanelClass:function(){switch(this.model.get("collection_type")){case"list":return i.ListCollectionView;case"paired":return i.PairCollectionView;case"list:paired":return i.ListOfPairsCollectionView}throw new TypeError("Uknown collection_type: "+this.model.get("collection_type"))},_swapNewRender:function(e){a.prototype._swapNewRender.call(this,e);var i=this.model.get("populated")?t.OK:t.RUNNING;return this.$el.addClass("state-"+i),this.$el},toString:function(){var t=this.model?this.model+"":"(no model)";return"HDCAListItemView("+t+")"}});return r.prototype.templates=function(){var t=o.extend({},a.prototype.templates.warnings,{hidden:n.wrapTemplate(["<% if( !collection.visible ){ %>",'
',s("This collection has been hidden"),"
","<% } %>"],"collection")}),e=n.wrapTemplate(['
','
','
','<%- collection.hid %> ','<%- collection.name %> ',"
",'
',"
"],"collection");return o.extend({},a.prototype.templates,{warnings:t,titleBar:e})}(),{HDCAListItemView:r}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(2))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(41),i(4),i(6),i(5)],s=function(t,e,i,n){"use strict";var s="history",c=o.Model.extend(i.LoggableMixin).extend(i.mixin(i.SearchableModelMixin,{_logNamespace:s,defaults:{model_class:"History",id:null,name:"Unnamed History",state:"new",deleted:!1},urlRoot:Galaxy.root+"api/histories",initialize:function(e,i,n){n=n||{},this.logger=n.logger||null,this.log(this+".initialize:",e,i,n),this.log("creating history contents:",i),this.contents=new t.HistoryContents(i||[],{historyId:this.get("id")}),this._setUpListeners(),this.updateTimeoutId=null},_setUpListeners:function(){this.on("error",function(t,e,i,n,s){this.errorHandler(t,e,i,n,s)}),this.contents&&this.listenTo(this.contents,"error",function(){this.trigger.apply(this,["error:contents"].concat(a.makeArray(arguments)))}),this.on("change:id",function(t,e){
-this.contents&&(this.contents.historyId=e)})},errorHandler:function(t,e,i,n,s){this.clearUpdateTimeout()},nice_size:function(){return e.bytesToString(this.get("size"),!0,2)},toJSON:function(){return r.extend(o.Model.prototype.toJSON.call(this),{nice_size:this.nice_size()})},get:function(t){return"nice_size"===t?this.nice_size():o.Model.prototype.get.apply(this,arguments)},ownedByCurrUser:function(){return Galaxy&&Galaxy.user?!Galaxy.user.isAnonymous()&&Galaxy.user.id===this.get("user_id"):!1},contentsCount:function(){return r.reduce(r.values(this.get("state_details")),function(t,e){return t+e},0)},numOfUnfinishedJobs:function(){var t=this.get("non_ready_jobs");return t?t.length:0},numOfUnfinishedShownContents:function(){var t=this.contents.running().visibleAndUndeleted();return t?t.length:0},searchAttributes:["name","annotation","tags"],searchAliases:{title:"name",tag:"tags"},_getSizeAndRunning:function(){return this.fetch({data:l.param({keys:"size,non_ready_jobs"})})},refresh:function(t){t=t||{};var e=this,i=e.lastUpdateTime;return e.contents.fetchUpdated(i).done(function(i,n,s){var o;try{o=new Date(s.getResponseHeader("Date"))}catch(a){}e.lastUpdateTime=o||new Date,e.checkForUpdates(t)})},checkForUpdates:function(t){function e(){n.clearUpdateTimeout(),n.updateTimeoutId=setTimeout(function(){n.refresh(t)},i)}t=t||{};var i=c.UPDATE_DELAY,n=this;this.numOfUnfinishedShownContents()>0?e():n._getSizeAndRunning().done(function(t){n.numOfUnfinishedJobs()>0?e():n.trigger("ready")})},clearUpdateTimeout:function(){this.updateTimeoutId&&(clearTimeout(this.updateTimeoutId),this.updateTimeoutId=null)},_delete:function(t){return this.get("deleted")?a.when():this.save({deleted:!0},t)},purge:function(t){return this.get("purged")?a.when():this.save({deleted:!0,purged:!0},t)},undelete:function(t){return this.get("deleted")?this.save({deleted:!1},t):a.when()},copy:function(t,e,i){if(t=void 0!==t?t:!0,!this.id)throw new Error("You must set the history ID before copying it.");var n={history_id:this.id};t&&(n.current=!0),e&&(n.name=e),i||(n.all_datasets=!1);var s=this,o=a.post(this.urlRoot,n);return t?o.then(function(t){var e=new c(t);return e.setAsCurrent().done(function(){s.trigger("copied",s,t)})}):o.done(function(t){s.trigger("copied",s,t)})},setAsCurrent:function(){var t=this,e=a.getJSON(Galaxy.root+"history/set_as_current?id="+this.id);return e.done(function(){t.trigger("set-as-current",t)}),e},toString:function(){return"History("+this.get("id")+","+this.get("name")+")"}}));c.UPDATE_DELAY=4e3,c.getHistoryData=function(t,e){function i(e){return"current"===t?a.getJSON(Galaxy.root+"history/current_history_json"):a.ajax(Galaxy.root+"api/histories/"+t)}function n(t){return t&&t.empty}function s(t){if(n(t))return[];r.isFunction(o)&&(o=o(t)),r.isFunction(l)&&(l=l(t));var e={v:"dev"};return o.length&&(e.details=o.join(",")),a.ajax(Galaxy.root+"api/histories/"+t.id+"/contents",{data:e})}e=e||{};var o=e.detailIdsFn||[],l=e.hdcaDetailIds||[],c=a.Deferred(),d=null,h=e.historyFn||i,u=e.contentsFn||s,p=h(t);p.done(function(t){d=t,c.notify({status:"history data retrieved",historyJSON:d})}),p.fail(function(t,e,i){c.reject(t,"loading the history")});var g=p.then(u);return g.then(function(t){c.notify({status:"contents data retrieved",historyJSON:d,contentsJSON:t}),c.resolve(d,t)}),g.fail(function(t,e,i){c.reject(t,"loading the contents",{history:d})}),c};var d={fetch:function(t){return t=t||{},t.data=t.data||this._buildFetchData(t),t.traditional=!0,o.Collection.prototype.fetch.call(this,t)},_fetchOptions:["order","limit","offset","view","keys"],_buildFetchData:function(t){var e={},i=this._fetchDefaults();t=r.defaults(t||{},i),e=r.pick(t,this._fetchOptions);var n=r.has(t,"filters")?t.filters:i.filters||{};return r.isEmpty(n)||r.extend(e,this._buildFetchFilters(n)),e},_fetchDefaults:function(){return{}},_buildFetchFilters:function(t){var e={q:[],qv:[]};return r.each(t,function(t,i){t===!0&&(t="True"),t===!1&&(t="False"),null===t&&(t="None"),e.q.push(i),e.qv.push(t)}),e}},h=o.Collection.extend(i.LoggableMixin).extend(d).extend({_logNamespace:s,model:c,DEFAULT_ORDER:"update_time",sortOrders:{update_time:{getter:function(t){return new Date(t.get("update_time"))},asc:!1},"update_time-asc":{getter:function(t){return new Date(t.get("update_time"))},asc:!0},name:{getter:function(t){return t.get("name")},asc:!0},"name-dsc":{getter:function(t){return t.get("name")},asc:!1},size:{getter:function(t){return t.get("size")},asc:!1},"size-asc":{getter:function(t){return t.get("size")},asc:!0}},initialize:function(t,e){e=e||{},this.log("HistoryCollection.initialize",arguments),this.includeDeleted=e.includeDeleted||!1,this.setOrder(e.order||this.DEFAULT_ORDER),this.currentHistoryId=e.currentHistoryId,this.allFetched=e.allFetched||!1,this.setUpListeners()},urlRoot:Galaxy.root+"api/histories",url:function(){return this.urlRoot},_fetchDefaults:function(){var t={order:this.order,view:"detailed"};return this.includeDeleted?t.filters={deleted:null}:t.filters={deleted:!1,purged:!1},t},setUpListeners:function(){this.on({"change:deleted":function(t){this.debug("change:deleted",this.includeDeleted,t.get("deleted")),!this.includeDeleted&&t.get("deleted")&&this.remove(t)},copied:function(t,e){this.setCurrent(new c(e,[]))},"set-as-current":function(t){var e=this.currentHistoryId;this.trigger("no-longer-current",e),this.currentHistoryId=t.id}})},sort:function(t){return t=t||{},this.setOrder(t.order),o.Collection.prototype.sort.call(this,t)},setOrder:function(t){var e=this,i=this.sortOrders[t];if(!r.isUndefined(i))return e.order=t,e.comparator=function(t,n){var s=e.currentHistoryId;return t.id===s?-1:n.id===s?1:(t=i.getter(t),n=i.getter(n),i.asc?t===n?0:t>n?1:-1:t===n?0:t>n?-1:1)},e.trigger("changed-order",e.order,e),e},fetch:function(t){if(t=t||{},this.allFetched)return a.when({});var e=this,i=r.defaults(t,{remove:!1,offset:e.length>=1?e.length-1:0,order:e.order}),n=t.limit;return r.isUndefined(n)||(i.limit=n),d.fetch.call(this,i).done(function(t){var i=r.isArray(t)?t.length:0;(!n||n>i)&&(e.allFetched=!0,e.trigger("all-fetched",e))})},create:function(t,e,i,n){var s=this,o=a.getJSON(Galaxy.root+"history/create_new_current");return o.done(function(t){s.setCurrent(new c(t,[],i||{}))})},setCurrent:function(t,e){return e=e||{},this.unshift(t,e),this.currentHistoryId=t.get("id"),e.silent||this.trigger("new-current",t,this),this},reset:function(t,e){return this.allFetched=!1,o.Collection.prototype.reset.call(this,t,e)},toString:function(){return"HistoryCollection("+this.length+")"}});return{History:c,HistoryCollection:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(42),i(118),i(6),i(5),i(82)],s=function(t,e,i,n){"use strict";var s="list",l=o.View.extend(i.LoggableMixin).extend({_logNamespace:s,viewClass:t.ListItemView,collectionClass:o.Collection,tagName:"div",className:"list-panel",fxSpeed:"fast",emptyMsg:n("This list is empty"),noneFoundMsg:n("No matching items found"),searchPlaceholder:n("search"),initialize:function(t,i){t=t||{},t.logger&&(this.logger=t.logger),this.log(this+".initialize:",t),this.fxSpeed=a.has(t,"fxSpeed")?t.fxSpeed:this.fxSpeed,this.filters=[],this.searchFor=t.searchFor||"",this.indicator=new e(this.$el),this.selecting=void 0!==t.selecting?t.selecting:!0,this.selected=t.selected||[],this.lastSelected=null,this.dragItems=t.dragItems||!1,this.viewClass=t.viewClass||this.viewClass,this.views=[],this.collection=t.collection||new this.collectionClass([]),this.filters=t.filters||[],this.$scrollContainer=t.$scrollContainer||this.$scrollContainer,this.title=t.title||"",this.subtitle=t.subtitle||"",this._setUpListeners()},freeViews:function(){return a.each(this.views,function(t){t.off()}),this.views=[],this},_setUpListeners:function(){return this.off(),this.on({error:function(t,e,i,n,s){console.error(t,e,i,n,s)},loading:function(){this._showLoadingIndicator("loading...",40)},"loading-done":function(){this._hideLoadingIndicator(40)}}),this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.logger&&this.on("all",function(t){this.log(this+"",arguments)}),this._setUpCollectionListeners(),this._setUpViewListeners(),this},_setUpCollectionListeners:function(){return this.log(this+"._setUpCollectionListeners",this.collection),this.collection.off(),this.listenTo(this.collection,{error:function(t,e,i,n,s){this.trigger("error",t,e,i,n,s)},reset:function(){this.renderItems()},add:this.addItemView,remove:this.removeItemView}),this.logger&&this.listenTo(this.collection,"all",function(t){this.info(this+"(collection)",arguments)}),this},_setUpViewListeners:function(){this.log(this+"._setUpViewListeners"),this.on({"view:selected":function(t,e){if(e&&e.shiftKey&&this.lastSelected){var i=this.viewFromModelId(this.lastSelected);i&&this.selectRange(t,i)}else e&&e.altKey&&!this.selecting&&this.showSelectors();this.selected.push(t.model.id),this.lastSelected=t.model.id},"view:de-selected":function(t,e){this.selected=a.without(this.selected,t.model.id)}})},render:function(t){this.log(this+".render",t);var e=this._buildNewRender();return this._setUpBehaviors(e),this._queueNewRender(e,t),this},_buildNewRender:function(){this.debug(this+"(ListPanel)._buildNewRender");var t=r(this.templates.el({},this));return this._renderControls(t),this._renderTitle(t),this._renderSubtitle(t),this._renderSearch(t),this.renderItems(t),t},_renderControls:function(t){this.debug(this+"(ListPanel)._renderControls");var e=r(this.templates.controls({},this));return t.find(".controls").replaceWith(e),e},_renderTitle:function(t){},_renderSubtitle:function(t){},_queueNewRender:function(t,e){e=void 0===e?this.fxSpeed:e;var i=this;i.log("_queueNewRender:",t,e),r(i).queue("fx",[function(t){this.$el.fadeOut(e,t)},function(e){i._swapNewRender(t),e()},function(t){this.$el.fadeIn(e,t)},function(t){i.trigger("rendered",i),t()}])},_swapNewRender:function(t){return this.$el.empty().attr("class",this.className).append(t.children()),this.selecting&&this.showSelectors(0),this},_setUpBehaviors:function(t){return t=t||this.$el,t.find(".controls [title]").tooltip({placement:"bottom"}),this._renderMultiselectActionMenu(t),this},_renderMultiselectActionMenu:function(t){t=t||this.$el;var e=t.find(".list-action-menu"),i=this.multiselectActions();if(!i.length)return e.empty();var s=r(['"].join("")),o=i.map(function(t){var e=['
',t.html," "].join("");return r(e).click(function(e){return e.preventDefault(),t.func(e)})});return s.find("ul").append(o),e.replaceWith(s),s},multiselectActions:function(){return[]},$scrollContainer:function(){return this.$el.parent().parent()},$list:function(t){return(t||this.$el).find("> .list-items")},$messages:function(t){return(t||this.$el).find("> .controls .messages")},$emptyMessage:function(t){return(t||this.$el).find("> .empty-message")},renderItems:function(t){t=t||this.$el;var e=this;e.log(this+".renderItems",t);var i=e.$list(t);return e.views=e._filterCollection().map(function(t){return e._createItemView(t).render(0)}),i.empty(),e.views.length?(e._attachItems(t),e.$emptyMessage(t).hide()):e._renderEmptyMessage(t).show(),e.trigger("views:ready",e.views),e.views},_filterCollection:function(){var t=this;return t.collection.filter(a.bind(t._filterItem,t))},_filterItem:function(t){var e=this;return a.every(e.filters.map(function(e){return e.call(t)}))&&(!e.searchFor||t.matchesAll(e.searchFor))},_createItemView:function(t){var e=this._getItemViewClass(t),i=a.extend(this._getItemViewOptions(t),{model:t}),n=new e(i);return this._setUpItemViewListeners(n),n},_getItemViewClass:function(t){return this.viewClass},_getItemViewOptions:function(t){return{fxSpeed:this.fxSpeed,expanded:!1,selectable:this.selecting,selected:a.contains(this.selected,t.id),draggable:this.dragItems}},_setUpItemViewListeners:function(t){var e=this;return this.listenTo(t,"all",function(){var t=Array.prototype.slice.call(arguments,0);t[0]="view:"+t[0],e.trigger.apply(e,t)}),this.listenTo(t,"draggable:dragstart",function(t,e){var i={},n=this.getSelectedModels();i=n.length?n.toJSON():[e.model.toJSON()],t.dataTransfer.setData("text",JSON.stringify(i))},this),e},_attachItems:function(t){return this.$list(t).append(this.views.map(function(t){return t.$el})),this},_renderEmptyMessage:function(t){this.debug("_renderEmptyMessage",t,this.searchFor);var e=this.searchFor?this.noneFoundMsg:this.emptyMsg;return this.$emptyMessage(t).text(e)},expandAll:function(){a.each(this.views,function(t){t.expand()})},collapseAll:function(){a.each(this.views,function(t){t.collapse()})},addItemView:function(t,e,i){this.log(this+".addItemView:",t);var n=this;if(n._filterItem(t)){var s=n._createItemView(t);return r(s).queue("fx",[function(t){n.$emptyMessage().fadeOut(n.fxSpeed,t)},function(t){n._attachView(s),t()}]),s}},_attachView:function(t){var e=this;e.views.push(t),e.$list().append(t.render(0).$el.hide()),e.trigger("view:attached",t),t.$el.slideDown(e.fxSpeed,function(){e.trigger("view:attached:rendered")})},removeItemView:function(t,e,i){this.log(this+".removeItemView:",t);var n=this,s=n.viewFromModel(t);if(s)return n.views=a.without(n.views,s),n.trigger("view:removed",s),r({}).queue("fx",[function(t){s.$el.fadeOut(n.fxSpeed,t)},function(t){s.remove(),n.trigger("view:removed:rendered"),n.views.length?t():n._renderEmptyMessage().fadeIn(n.fxSpeed,t)}]),s},viewFromModelId:function(t){for(var e=0;e
i?this.views.slice(i,n+1):this.views.slice(n,i+1)},_renderSearch:function(t){return t.find(".controls .search-input").searchInput({placeholder:this.searchPlaceholder,initialVal:this.searchFor,onfirstsearch:a.bind(this._firstSearch,this),onsearch:a.bind(this.searchItems,this),onclear:a.bind(this.clearSearch,this)}),t},_firstSearch:function(t){return this.log("onFirstSearch",t),this.searchItems(t)},searchItems:function(t){return this.searchFor=t,this.trigger("search:searching",t,this),this.renderItems(),this.$("> .controls .search-query").val(t),this},clearSearch:function(t){return this.searchFor="",this.trigger("search:clear",this),this.$("> .controls .search-query").val(""),this.renderItems(),this},THROTTLE_SELECTORS_AT:20,showSelectors:function(t){t=void 0!==t?t:this.fxSpeed,this.selecting=!0,this.$(".list-actions").slideDown(t),t=this.views.length>=this.THROTTLE_SELECTORS_AT?0:t,a.each(this.views,function(e){e.showSelector(t)})},hideSelectors:function(t){t=void 0!==t?t:this.fxSpeed,this.selecting=!1,this.$(".list-actions").slideUp(t),t=this.views.length>=this.THROTTLE_SELECTORS_AT?0:t,a.each(this.views,function(e){e.hideSelector(t)}),this.selected=[],this.lastSelected=null},toggleSelectors:function(){this.selecting?this.hideSelectors():this.showSelectors()},selectAll:function(t){a.each(this.views,function(e){e.select(t)})},deselectAll:function(t){this.lastSelected=null,a.each(this.views,function(e){e.deselect(t)})},selectRange:function(t,e){var i=this.viewRange(t,e);return a.each(i,function(t){t.select()}),i},getSelectedViews:function(){return a.filter(this.views,function(t){return t.selected})},getSelectedModels:function(){return new this.collection.constructor(a.map(this.getSelectedViews(),function(t){return t.model}))},_showLoadingIndicator:function(t,i,n){this.debug("_showLoadingIndicator",this.indicator,t,i,n),i=void 0!==i?i:this.fxSpeed,this.indicator||(this.indicator=new e(this.$el,this.$el.parent()),this.debug(" created",this.indicator)),this.$el.is(":visible")?(this.$el.fadeOut(i),this.indicator.show(t,i,n)):this.indicator.show(0,n)},_hideLoadingIndicator:function(t,e){this.debug("_hideLoadingIndicator",this.indicator,t,e),t=void 0!==t?t:this.fxSpeed,this.indicator&&this.indicator.hide(t,e)},scrollPosition:function(){return this.$scrollContainer().scrollTop()},scrollTo:function(t,e){return e=e||0,this.$scrollContainer().animate({scrollTop:t},e),this},scrollToTop:function(t){return this.scrollTo(0,t)},scrollToItem:function(t,e){if(!t)return this;var i=t.el.offsetTop;return this.scrollTo(i,e)},scrollToId:function(t,e){return this.scrollToItem(this.viewFromModelId(t),e)},events:{"click .select-all":"selectAll","click .deselect-all":"deselectAll"},toString:function(){return"ListPanel("+this.collection+")"}});l.prototype.templates=function(){var t=i.wrapTemplate([""]),e=i.wrapTemplate(['','
",'
<%- view.subtitle %>
','
','
','
",'
','
','',n("All")," ",'',n("None")," ","
",'","
","
"]);return{el:t,controls:e}}();var c=l.extend({modelCollectionKey:"contents",initialize:function(t){l.prototype.initialize.call(this,t),this.selecting=void 0!==t.selecting?t.selecting:!1,this.setModel(this.model,t)},setModel:function(t,e){if(e=e||{},this.debug(this+".setModel:",t,e),this.freeModel(),this.freeViews(),t){var i=this.model?this.model.get("id"):null;this.model=t,this.logger&&(this.model.logger=this.logger),this._setUpModelListeners(),this.collection.off(),this.collection=this.model[this.modelCollectionKey]?this.model[this.modelCollectionKey]:e.collection||new this.collectionClass([]),this._setUpCollectionListeners(),i&&t.get("id")!==i&&this.trigger("new-model",this)}return this},freeModel:function(){return this.model&&this.stopListening(this.model),this},_setUpModelListeners:function(){return this.log(this+"._setUpModelListeners",this.model),this.listenTo(this.model,"error",function(){var t=Array.prototype.slice.call(arguments,0);t.unshift("error"),this.trigger.apply(this,t)},this),this},_renderControls:function(t){this.debug(this+"(ListPanel)._renderControls");var e=this.model?this.model.toJSON():{},i=r(this.templates.controls(e,this));return t.find(".controls").replaceWith(i),i},toString:function(){return"ModelListPanel("+this.model+")"}});return c.prototype.templates=function(){var t=i.wrapTemplate(['','
",'
<%- view.subtitle %>
','
','
','
",'
','
','',n("All")," ",'',n("None")," ","
",'","
","
"]);return a.extend(a.clone(l.prototype.templates),{controls:t})}(),{ListPanel:l,ModelListPanel:c}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2),i(1))},function(t,e,i){var n,s;(function(o,a){n=[i(6),i(5)],s=function(t,e){var i=o.View.extend(t.LoggableMixin).extend(t.HiddenUntilActivatedViewMixin).extend({tagName:"div",className:"tags-display",initialize:function(t){this.listenTo(this.model,"change:tags",function(){this.render()}),this.hiddenUntilActivated(t.$activator,t)},render:function(){var t=this;return this.$el.html(this._template()),this.$input().select2({placeholder:"Add tags",width:"100%",tags:function(){return t._getTagsUsed()}}),this._setUpBehaviors(),this},_template:function(){return['',e("Tags")," ",' '].join("")},tagsToCSV:function(){var t=this.model.get("tags");return!a.isArray(t)||a.isEmpty(t)?"":t.map(function(t){return a.escape(t)}).sort().join(",")},$input:function(){return this.$el.find("input.tags-input")},_getTagsUsed:function(){return Galaxy.user.get("tags_used")},_setUpBehaviors:function(){var t=this;this.$input().on("change",function(e){t.model.save({tags:e.val},{silent:!0}),e.added&&t._addNewTagToTagsUsed(e.added.text+"")})},_addNewTagToTagsUsed:function(t){var e=Galaxy.user.get("tags_used");a.contains(e,t)||(e.push(t),e.sort(),Galaxy.user.set("tags_used",e))},remove:function(){this.$input.off(),this.stopListening(this.model),o.View.prototype.remove.call(this)},toString:function(){return["TagsEditor(",this.model+"",")"].join("")}});return{TagsEditor:i}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(2))},function(t,e,i){var n,s;(function(o,a){n=[i(4)],s=function(t){return o.View.extend({initialize:function(e){this.options=t.merge(e,{class_add:"upload-icon-button fa fa-square-o",class_remove:"upload-icon-button fa fa-check-square-o",class_partial:"upload-icon-button fa fa-minus-square-o",collection:null,onchange:function(){},onadd:function(){},onremove:function(){}});var i=this;this.collection=this.options.collection,this.setElement(this._template()),this.rows=[],t.get({url:Galaxy.root+"api/remote_files",success:function(t){i._fill(t)},error:function(){i._fill()}})},_fill:function(e){if(e&&e.length>0){this.$el.find("#upload-ftp-content").html(a(this._templateTable()));var i=0;for(index in e)this.rows.push(this._add(e[index])),i+=e[index].size;if(this.$el.find("#upload-ftp-number").html(e.length+" files"),this.$el.find("#upload-ftp-disk").html(t.bytesToString(i,!0)),this.collection){var n=this;this.$("._has_collection").show(),this.$select_all=a("#upload-selectall"),this.$select_all.addClass(this.options.class_add),this.$select_all.on("click",function(){var t=n.$select_all.hasClass(n.options.class_add);for(index in e){var i=e[index],s=n._find(i);(!s&&t||s&&!t)&&n.rows[index].trigger("click")}}),this._refresh()}}else this.$el.find("#upload-ftp-content").html(a(this._templateInfo()));this.$el.find("#upload-ftp-wait").hide()},_add:function(t){var e=this,i=a(this._templateRow(t)),n=i.find(".icon");if(a(this.el).find("tbody").append(i),this.collection){var s="";s=this._find(t)?this.options.class_remove:this.options.class_add,n.addClass(s),i.on("click",function(){var i=e._find(t);n.removeClass(),i?(e.options.onremove(i),n.addClass(e.options.class_add)):(e.options.onadd(t),n.addClass(e.options.class_remove)),e._refresh()})}else i.on("click",function(){e.options.onchange(t)});return i},_refresh:function(){var t=this.collection.where({file_mode:"ftp",enabled:!0});this.$select_all.removeClass(),0==t.length?this.$select_all.addClass(this.options.class_add):t.length==this.rows.length?this.$select_all.addClass(this.options.class_remove):this.$select_all.addClass(this.options.class_partial)},_find:function(t){var e=this.collection.findWhere({file_path:t.path,file_mode:"ftp",enabled:!0});return e&&e.get("id")},_templateRow:function(e){return'
'+e.path+' '+t.bytesToString(e.size)+' '+e.ctime+" "},_templateTable:function(){return'Available files: '},_templateInfo:function(){return'Your FTP directory does not contain any files.
'},_template:function(){return'
This Galaxy server allows you to upload files via FTP. To upload some files, log in to the FTP server at '+this.options.ftp_upload_site+' using your Galaxy credentials (email address and password).
'}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1))},function(t,e,i){var n,s;(function(o,a,r){n=[i(4)],s=function(t){return o.View.extend({options:{class_check:"fa-check-square-o",class_uncheck:"fa-square-o",parameters:[{id:"space_to_tab",title:"Convert spaces to tabs"},{id:"to_posix_lines",title:"Use POSIX standard"}]},initialize:function(t){this.model=t.model,this.setElement(a("
").addClass("upload-settings")),this.$el.append(a("
").addClass("upload-settings-cover")),this.$el.append(a("
").addClass("upload-settings-table ui-table-striped").append("
")),this.$cover=this.$(".upload-settings-cover"),this.$table=this.$(".upload-settings-table > tbody"),this.listenTo(this.model,"change",this.render,this),this.model.trigger("change")},render:function(){var t=this;this.$table.empty(),r.each(this.options.parameters,function(e){var i=a("
").addClass("upload-"+e.id+" upload-icon-button fa").addClass(t.model.get(e.id)&&t.options.class_check||t.options.class_uncheck).on("click",function(){t.model.get("enabled")&&t.model.set(e.id,!t.model.get(e.id))});t.$table.append(a("
").append(a("
").append(i)).append(a("
").append(e.title)))}),this.$cover[this.model.get("enabled")&&"hide"||"show"]()}})}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(3),i(1),i(2))},,,function(t,e,i){var n,s,o;(function(i,a){!function(i){s=[],n=i,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(){i.fn.extend({hoverhighlight:function(t,e){return t=t||"body",this.length?(a(this).each(function(){var i=a(this),n=i.data("target");n&&i.mouseover(function(i){a(n,t).css({background:e})}).mouseout(function(t){a(n).css({background:""})})}),this):this}})})}).call(e,i(1),i(1))},function(t,e,i){var n,s,o;(function(i,a){!function(i){s=[],n=i,o="function"==typeof n?n.apply(e,s):n,!(void 0!==o&&(t.exports=o))}(function(){function t(t,n){function s(t){var e=i(this).parent().children("input");e.focus().val("").trigger("clear:searchInput"),n.onclear()}function o(t,e){i(this).trigger("search:searchInput",e),"function"==typeof n.onfirstsearch&&f?(f=!1,n.onfirstsearch(e)):n.onsearch(e)}function r(){return['
"].join("")}function l(){return i(r()).focus(function(t){i(this).select()}).keyup(function(t){if(t.preventDefault(),t.stopPropagation(),i(this).val()||i(this).blur(),t.which===u&&n.escWillClear)s.call(this,t);else{var e=i(this).val();t.which===p||n.minSearchLen&&e.length>=n.minSearchLen?o.call(this,t,e):e.length||s.call(this,t)}}).on("change",function(t){o.call(this,t,i(this).val())}).val(n.initialVal)}function c(){return i(['
'].join("")).tooltip({placement:"bottom"}).click(function(t){s.call(this,t)})}function d(){return i(['
'].join("")).hide().tooltip({placement:"bottom"})}function h(){g.find(".search-loading").toggle(),g.find(".search-clear").toggle()}var u=27,p=13,g=i(t),f=!0,m={initialVal:"",name:"search",placeholder:"search",classes:"",onclear:function(){},onfirstsearch:null,onsearch:function(t){},minSearchLen:0,escWillClear:!0,oninit:function(){}};return"string"===a.type(n)?("toggle-loading"===n&&h(),g):("object"===a.type(n)&&(n=a.extend(!0,{},m,n)),g.addClass("search-input").prepend([l(),c(),d()]))}var e=window._l||function(t){return t};a.fn.extend({searchInput:function(e){return this.each(function(){return t(this,e)})}})})}).call(e,i(1),i(1))},,function(t,e,i){var n,s;n=[],s=function(){function t(t,e){var i=/(-?[0-9\.]+)/g,n=t.toString().toLowerCase()||"",s=e.toString().toLowerCase()||"",o=String.fromCharCode(0),a=n.replace(i,o+"$1"+o).split(o),r=s.replace(i,o+"$1"+o).split(o),l=new Date(n).getTime(),c=l?new Date(s).getTime():null;if(c){if(c>l)return-1;if(l>c)return 1}for(var d,h,u=0,p=Math.max(a.length,r.length);p>u;u++){if(d=parseFloat(a[u])||a[u],h=parseFloat(r[u])||r[u],h>d)return-1;if(d>h)return 1}return 0}return t}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){(function(t,e){!function(i){t.event.props.push("dataTransfer"),i.uploadpost=function(e){var n=i.extend({},{data:{},success:function(){},error:function(){},progress:function(){},url:null,maxfilesize:2048,error_filesize:"File exceeds 2GB. Please use a FTP client.",error_default:"Please make sure the file is available.",error_server:"Upload request failed.",error_login:"Uploads require you to log in."},e),s=n.data;if(s.error_message)return void n.error(s.error_message);var o=new FormData;for(var a in s.payload)o.append(a,s.payload[a]);var r=0;for(var a in s.files){var l=s.files[a];o.append(l.name,l.file,l.file.name),r+=l.file.size}return r>1048576*n.maxfilesize?void n.error(n.error_filesize):(xhr=new XMLHttpRequest,xhr.open("POST",n.url,!0),xhr.setRequestHeader("Accept","application/json"),xhr.setRequestHeader("Cache-Control","no-cache"),xhr.setRequestHeader("X-Requested-With","XMLHttpRequest"),xhr.onreadystatechange=function(){if(xhr.readyState==xhr.DONE){var e=null;if(xhr.responseText)try{e=t.parseJSON(xhr.responseText)}catch(i){e=xhr.responseText}if(xhr.status<200||xhr.status>299){var s=xhr.statusText;403==xhr.status?s=n.error_login:0==xhr.status?s=n.error_server:s||(s=n.error_default),n.error(s+" ("+xhr.status+")")}else n.success(e)}},xhr.upload.addEventListener("progress",function(t){t.lengthComputable&&n.progress(Math.round(100*t.loaded/t.total))},!1),Galaxy.emit.debug("uploadbox::uploadpost()","Posting following data.",n),void xhr.send(o))},i.fn.uploadinput=function(t){var e=this,n=i.extend({},{ondragover:function(){},ondragleave:function(){},onchange:function(){},multiple:!1},t),s=i('
");return e.append(s.change(function(t){n.onchange(t.target.files),i(this).val("")})),e.on("drop",function(t){n.ondragleave(t),t.dataTransfer&&(n.onchange(t.dataTransfer.files),t.preventDefault())}),e.on("dragover",function(t){t.preventDefault(),n.ondragover(t)}),e.on("dragleave",function(t){t.stopPropagation(),n.ondragleave(t)}),{dialog:function(){s.trigger("click")}}},i.fn.uploadbox=function(t){function n(t){if(t&&t.length&&!m){var i=g;return e.each(t,function(t,i){"new"!==t.mode&&e.filter(p,function(e){return e.name===t.name&&e.size===t.size}).length&&(t.duplicate=!0)}),e.each(t,function(t){if(!t.duplicate){var e=String(g++);p[e]=t,u.announce(e,p[e]),f++}}),i}}function s(t){p[t]&&(delete p[t],f--)}function o(){if(0==f||v)return v=!1,m=!1,void u.complete();m=!0;var t=-1;for(var e in p){t=e;break}p[t];s(t),i.uploadpost({url:u.url,data:u.initialize(t),success:function(e){u.success(t,e),o()},error:function(e){u.error(t,e),o()},progress:function(e){u.progress(t,e)}})}function a(){_.dialog()}function r(t){for(t in p)s(t)}function l(){m||(m=!0,o())}function c(){v=!0}function d(t){return u=i.extend({},u,t)}function h(){return window.File&&window.FormData&&window.XMLHttpRequest&&window.FileList}var u=i.extend({},{dragover:function(){},dragleave:function(){},announce:function(t){},
-initialize:function(t){},progress:function(t,e){},success:function(t,e){},error:function(t,e){alert(e)},complete:function(){}},t),p={},g=0,f=0,m=!1,v=!1,_=i(this).uploadinput({multiple:!0,onchange:function(t){n(t)},ondragover:t.ondragover,ondragleave:t.ondragleave});return{select:a,add:n,remove:s,start:l,stop:c,reset:r,configure:d,compatible:h}}}(t)}).call(e,i(1),i(2))},function(t,e,i){var n=i(11).RightPanel,s=i(7),o=i(107);CurrentHistoryView=i(104).CurrentHistoryView,_l=i(5);var a=n.extend({title:_l("History"),initialize:function(t){n.prototype.initialize.call(this,t);var e=this;this.refreshButton=new s.ButtonLink({id:"history-refresh-button",title:_l("Refresh history"),cls:"panel-header-button",icon:"fa fa-refresh",onclick:function(){e.historyView.loadCurrentHistory()}}),this.optionsButton=new s.ButtonLink({id:"history-options-button",title:_l("History options"),cls:"panel-header-button",icon:"fa fa-cog"}),this.viewMultiButton=null,t.userIsAnonymous||(this.viewMultiButton=new s.ButtonLink({id:"history-view-multi-button",title:_l("View all histories"),cls:"panel-header-button",icon:"fa fa-columns",href:t.galaxyRoot+"history/view_multiple"})),this.optionsMenu=o(this.optionsButton.$el,{anonymous:t.userIsAnonymous,purgeAllowed:t.allow_user_dataset_purge,root:t.galaxyRoot}),this.historyView=new CurrentHistoryView({purgeAllowed:t.allow_user_dataset_purge,linkTarget:"galaxy_main",$scrollContainer:function(){return this.$el.parent()}})},render:function(){n.prototype.render.call(this),this.$(".unified-panel-header").addClass("history-panel-header"),this.$(".panel-header-buttons").append([this.refreshButton.$el,this.optionsButton.$el,this.viewMultiButton?this.viewMultiButton.$el:null]),this.historyView.setElement(this.$(".history-panel"))},_templateBody:function(t){return['
"].join("")},toString:function(){return"HistoryPanel"}});t.exports=a},function(t,e,i){(function(e,n){var s=i(11).LeftPanel,o=i(44),a=i(114),r=i(5),l=s.extend({title:r("Tools"),initialize:function(t){s.prototype.initialize.call(this,t),this.log(this+".initialize:",t),this.stored_workflow_menu_entries=t.stored_workflow_menu_entries||[];var e=new o.ToolSearch({search_url:t.search_url,hidden:!1}),i=new o.ToolCollection(t.toolbox);this.tool_panel=new o.ToolPanel({tool_search:e,tools:i,layout:t.toolbox_in_panel}),this.tool_panel_view=new o.ToolPanelView({model:this.tool_panel}),this.uploadButton=new a({nginx_upload_path:t.nginx_upload_path,ftp_upload_site:t.ftp_upload_site,default_genome:t.default_genome,default_extension:t.default_extension})},render:function(){var t=this;s.prototype.render.call(t),t.$(".panel-header-buttons").append(t.uploadButton.$el),t.tool_panel.get("layout").size()>0&&(t.tool_panel_view.render(),t.$(".toolMenu").show()),t.$(".toolMenuContainer").prepend(t.tool_panel_view.$el),t._renderWorkflowMenu(),t.$("a[minsizehint]").click(function(){parent.handle_minwidth_hint&&parent.handle_minwidth_hint(e(t).attr("minsizehint"))})},_renderWorkflowMenu:function(){var t=this;t.$("#internal-workflows").append(t._templateTool({title:r("All workflows"),href:"workflow/list_for_run"})),n.each(t.stored_workflow_menu_entries,function(e){t.$("#internal-workflows").append(t._templateTool({title:e.stored_workflow.name,href:"workflow/run?id="+e.encoded_stored_workflow_id}))})},_templateTool:function(t){return['
"].join("")},_templateBody:function(){return['
','","
"].join("")},toString:function(){return"ToolPanel"}});t.exports=l}).call(e,i(1),i(2))},,,,,,,,,,function(t,e,i){var n,s;(function(o,a){n=[i(29),i(69),i(6),i(5)],s=function(t,e,i,n){"use strict";var s=t.DCListItemView,r=s.extend({initialize:function(t){s.prototype.initialize.call(this,t)},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCListItemEdit("+t+")"}}),l=t.DCEListItemView,c=l.extend({initialize:function(t){l.prototype.initialize.call(this,t)},toString:function(){var t=this.model?this.model+"":"(no model)";return"DCEListItemEdit("+t+")"}}),d=e.DatasetListItemEdit.extend({initialize:function(t){e.DatasetListItemEdit.prototype.initialize.call(this,t)},_fetchModelDetails:function(){var t=this;return t.model.inReadyState()&&!t.model.hasDetails()?t.model.fetch({silent:!0}):o.when()},_renderDeleteButton:function(){return null},toString:function(){var t=this.model?this.model+"":"(no model)";return"DatasetDCEListItemEdit("+t+")"}});d.prototype.templates=function(){return a.extend({},e.DatasetListItemEdit.prototype.templates,{titleBar:t.DatasetDCEListItemView.prototype.templates.titleBar})}();var h=t.NestedDCDCEListItemView.extend({toString:function(){var t=this.model?this.model+"":"(no model)";return"NestedDCDCEListItemEdit("+t+")"}});return{DCListItemEdit:r,DCEListItemEdit:c,DatasetDCEListItemEdit:d,NestedDCDCEListItemEdit:h}}.apply(e,n),!(void 0!==s&&(t.exports=s))}).call(e,i(1),i(2))},function(t,e,i){var n,s;n=[i(68),i(30),i(97),i(6),i(5),i(16)],s=function(t,e,i,n,s){"use strict";var o=t.CollectionView,a=o.extend({DatasetDCEViewClass:i.DatasetDCEListItemEdit,NestedDCDCEViewClass:i.NestedDCDCEListItemEdit,initialize:function(t){o.prototype.initialize.call(this,t)},_setUpBehaviors:function(t){if(t=t||this.$el,o.prototype._setUpBehaviors.call(this,t),this.model&&Galaxy.user&&!Galaxy.user.isAnonymous()){var e=this,i="> .controls .name";t.find(i).attr("title",s("Click to rename collection")).tooltip({placement:"bottom"}).make_text_editable({on_finish:function(t){var n=e.model.get("name");t&&t!==n?(e.$el.find(i).text(t),e.model.save({name:t}).fail(function(){e.$el.find(i).text(e.model.previous("name"))})):e.$el.find(i).text(n)}})}},toString:function(){return"CollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),r=a.extend({DatasetDCEViewClass:i.DatasetDCEListItemEdit,toString:function(){return"ListCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),l=r.extend({toString:function(){return"PairCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),c=l.extend({_setUpBehaviors:function(t){o.prototype._setUpBehaviors.call(this,t)},toString:function(){return"NestedPairCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}}),d=a.extend({NestedDCDCEViewClass:i.NestedDCDCEListItemEdit.extend({foldoutPanelClass:c}),toString:function(){return"ListOfPairsCollectionViewEdit("+(this.model?this.model.get("name"):"")+")"}});return{CollectionViewEdit:a,ListCollectionViewEdit:r,PairCollectionViewEdit:l,ListOfPairsCollectionViewEdit:d}}.apply(e,n),!(void 0!==s&&(t.exports=s))},function(t,e,i){var n,s;(function(o,a,r,l){n=[i(121),i(84),i(31),i(6),i(5),i(81)],s=function(t,e,i,n,s){"use strict";function c(t){function e(){return i.length||(i=[new RegExp(this.filters[0]),new RegExp(this.filters[1])]),i}t=t||{},t.createPair=t.createPair||function(t){t=t||{};var e=t.listA.splice(t.indexA,1)[0],i=t.listB.splice(t.indexB,1)[0],n=t.listB.indexOf(e),s=t.listA.indexOf(i);return-1!==n&&t.listB.splice(n,1),-1!==s&&t.listA.splice(s,1),this._pair(e,i,{silent:!0})};var i=[];return t.preprocessMatch=t.preprocessMatch||function(t){var i=e.call(this);return a.extend(t,{matchTo:t.matchTo.name.replace(i[0],""),possible:t.possible.name.replace(i[1],"")})},function(e){this.debug("autopair _strategy ---------------------------"),e=e||{};var i,n=e.listA,s=e.listB,o=0,a={score:0,index:null},r=[];for(this.debug("starting list lens:",n.length,s.length),this.debug("bestMatch (starting):",JSON.stringify(a,null," "));o
=d?r.push(t.createPair.call(this,{listA:n,indexA:o,listB:s,indexB:a.index})):o+=1,!n.length||!s.length)return r}return this.debug("paired:",JSON.stringify(r,null," ")),this.debug("autopair _strategy ---------------------------"),r}}function d(t){var e=t.toJSON();return g(e,{historyId:t.historyId})}var h="collections",u=o.View.extend(n.LoggableMixin).extend({_logNamespace:h,tagName:"li",className:"dataset paired",initialize:function(t){this.pair=t.pair||{}},template:a.template(['<%- pair.forward.name %> ','','<%- pair.name %> '," ",'<%- pair.reverse.name %> '].join("")),render:function(){return this.$el.attr("draggable",!0).data("pair",this.pair).html(this.template({pair:this.pair})).addClass("flex-column-container"),this},events:{dragstart:"_dragstart",dragend:"_dragend",dragover:"_sendToParent",drop:"_sendToParent"},_dragstart:function(t){t.currentTarget.style.opacity="0.4",t.originalEvent&&(t=t.originalEvent),t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",JSON.stringify(this.pair)),this.$el.parent().trigger("pair.dragstart",[this])},_dragend:function(t){t.currentTarget.style.opacity="1.0",this.$el.parent().trigger("pair.dragend",[this])},_sendToParent:function(t){this.$el.parent().trigger(t)},toString:function(){return"PairView("+this.pair.name+")"}}),p=o.View.extend(n.LoggableMixin).extend({_logNamespace:h,className:"list-of-pairs-collection-creator collection-creator flex-row-container",initialize:function(t){this.metric("PairedCollectionCreator.initialize",t),t=a.defaults(t,{datasets:[],filters:this.DEFAULT_FILTERS,automaticallyPair:!0,strategy:"lcs",matchPercentage:.9,twoPassAutopairing:!0}),this.initialList=t.datasets,this.historyId=t.historyId,this.filters=this.commonFilters[t.filters]||this.commonFilters[this.DEFAULT_FILTERS],a.isArray(t.filters)&&(this.filters=t.filters),this.automaticallyPair=t.automaticallyPair,this.strategy=this.strategies[t.strategy]||this.strategies[this.DEFAULT_STRATEGY],a.isFunction(t.strategy)&&(this.strategy=t.strategy),this.matchPercentage=t.matchPercentage,this.twoPassAutopairing=t.twoPassAutopairing,this.removeExtensions=!0,this.oncancel=t.oncancel,this.oncreate=t.oncreate,this.autoscrollDist=t.autoscrollDist||24,this.unpairedPanelHidden=!1,this.pairedPanelHidden=!1,this.$dragging=null,this.blocking=!1,this._setUpBehaviors(),this._dataSetUp()},commonFilters:{illumina:["_1","_2"],Rs:["_R1","_R2"]},DEFAULT_FILTERS:"illumina",strategies:{simple:"autopairSimple",lcs:"autopairLCS",levenshtein:"autopairLevenshtein"},DEFAULT_STRATEGY:"lcs",_dataSetUp:function(){this.paired=[],this.unpaired=[],this.selectedIds=[],this._sortInitialList(),this._ensureIds(),this.unpaired=this.initialList.slice(0),this.automaticallyPair&&(this.autoPair(),this.once("rendered:initial",function(){this.trigger("autopair")}))},_sortInitialList:function(){this._sortDatasetList(this.initialList)},_sortDatasetList:function(t){return t.sort(function(t,i){return e(t.name,i.name)}),t},_ensureIds:function(){return this.initialList.forEach(function(t){t.hasOwnProperty("id")||(t.id=a.uniqueId())}),this.initialList},_splitByFilters:function(){function t(t,e){return e.test(t.name)}var e=this.filters.map(function(t){return new RegExp(t)}),i=[[],[]];return this.unpaired.forEach(function(n){e.forEach(function(e,s){t(n,e)&&i[s].push(n)})}),i},_addToUnpaired:function(t){var i=function(n,s){if(n===s)return n;var o=Math.floor((s-n)/2)+n,a=e(t.name,this.unpaired[o].name);if(0>a)return i(n,o);if(a>0)return i(o+1,s);for(;this.unpaired[o]&&this.unpaired[o].name===t.name;)o++;return o}.bind(this);this.unpaired.splice(i(0,this.unpaired.length),0,t)},autoPair:function(t){var e=this._splitByFilters(),i=[];return this.twoPassAutopairing&&(i=this.autopairSimple({listA:e[0],listB:e[1]}),e=this._splitByFilters()),t=t||this.strategy,e=this._splitByFilters(),i=i.concat(this[t].call(this,{listA:e[0],listB:e[1]}))},autopairSimple:c({scoreThreshold:function(){return 1},match:function(t){return t=t||{},t.matchTo===t.possible?{index:t.index,score:1}:t.bestMatch}}),autopairLevenshtein:c({scoreThreshold:function(){return this.matchPercentage},match:function(e){e=e||{};var i=t(e.matchTo,e.possible),n=1-i/Math.max(e.matchTo.length,e.possible.length);return n>e.bestMatch.score?{index:e.index,score:n}:e.bestMatch}}),autopairLCS:c({scoreThreshold:function(){return this.matchPercentage},match:function(t){t=t||{};var e=this._naiveStartingAndEndingLCS(t.matchTo,t.possible).length,i=e/Math.max(t.matchTo.length,t.possible.length);return i>t.bestMatch.score?{index:t.index,score:i}:t.bestMatch}}),_naiveStartingAndEndingLCS:function(t,e){for(var i="",n="",s=0,o=0;s=0&&o>=0&&t[s]===e[o];)n=[t[s],n].join(""),s-=1,o-=1;return i+n},_pair:function(t,e,i){i=i||{},this.debug("_pair:",t,e);var n=this._createPair(t,e,i.name);return this.paired.push(n),this.unpaired=a.without(this.unpaired,t,e),i.silent||this.trigger("pair:new",n),n},_createPair:function(t,e,i){if(!t||!e||t===e)throw new Error("Bad pairing: "+[JSON.stringify(t),JSON.stringify(e)]);return i=i||this._guessNameForPair(t,e),{forward:t,name:i,reverse:e}},_guessNameForPair:function(t,e,i){i=void 0!==i?i:this.removeExtensions;var n=t.name,s=e.name,o=this._naiveStartingAndEndingLCS(n.replace(new RegExp(this.filters[0]),""),s.replace(new RegExp(this.filters[1]),""));if(i){var a=o.lastIndexOf(".");if(a>0){var r=o.slice(a,o.length);o=o.replace(r,""),n=n.replace(r,""),s=s.replace(r,"")}}return o||n+" & "+s},_unpair:function(t,e){if(e=e||{},!t)throw new Error("Bad pair: "+JSON.stringify(t));return this.paired=a.without(this.paired,t),this._addToUnpaired(t.forward),this._addToUnpaired(t.reverse),e.silent||this.trigger("pair:unpair",[t]),t},unpairAll:function(){for(var t=[];this.paired.length;)t.push(this._unpair(this.paired[0],{silent:!0}));this.trigger("pair:unpair",t)},_pairToJSON:function(t,e){return e=e||"hda",{collection_type:"paired",src:"new_collection",name:t.name,element_identifiers:[{name:"forward",id:t.forward.id,src:e},{name:"reverse",id:t.reverse.id,src:e}]}},createList:function(t){var e=this,i=Galaxy.root+"api/histories/"+this.historyId+"/contents/dataset_collections",n={type:"dataset_collection",collection_type:"list:paired",name:a.escape(t||e.$(".collection-name").val()),element_identifiers:e.paired.map(function(t){return e._pairToJSON(t)})};return e.blocking=!0,r.ajax(i,{type:"POST",contentType:"application/json",dataType:"json",data:JSON.stringify(n)}).always(function(){e.blocking=!1}).fail(function(t,i,n){e._ajaxErrHandler(t,i,n)}).done(function(t,i,n){e.trigger("collection:created",t,i,n),e.metric("collection:created",t),"function"==typeof e.oncreate&&e.oncreate.call(this,t,i,n)})},_ajaxErrHandler:function(t,e,i){this.error(t,e,i);var n=s("An error occurred while creating this collection");t&&(n+=0===t.readyState&&0===t.status?": "+s("Galaxy could not be reached and may be updating.")+s(" Try again in a few minutes."):t.responseJSON?""+JSON.stringify(t.responseJSON)+" ":": "+i),creator._showAlert(n,"alert-danger")},render:function(t,e){return this.$el.empty().html(p.templates.main()),this._renderHeader(t),this._renderMiddle(t),this._renderFooter(t),this._addPluginComponents(),this.trigger("rendered",this),this},_renderHeader:function(t,e){var i=this.$(".header").empty().html(p.templates.header()).find(".help-content").prepend(l(p.templates.helpContent()));return this._renderFilters(),i},_renderFilters:function(){return this.$(".forward-column .column-header input").val(this.filters[0]).add(this.$(".reverse-column .column-header input").val(this.filters[1]))},_renderMiddle:function(t,e){var i=this.$(".middle").empty().html(p.templates.middle());return this.unpairedPanelHidden?this.$(".unpaired-columns").hide():this.pairedPanelHidden&&this.$(".paired-columns").hide(),this._renderUnpaired(),this._renderPaired(),i},_renderUnpaired:function(t,e){var i,n,o=this,a=[],r=this._splitByFilters();return this.$(".forward-column .title").text([r[0].length,s("unpaired forward")].join(" ")),this.$(".forward-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-r[0].length)),this.$(".reverse-column .title").text([r[1].length,s("unpaired reverse")].join(" ")),this.$(".reverse-column .unpaired-info").text(this._renderUnpairedDisplayStr(this.unpaired.length-r[1].length)),this.$(".unpaired-columns .column-datasets").empty(),this.$(".autopair-link").toggle(0!==this.unpaired.length),0===this.unpaired.length?void this._renderUnpairedEmpty():(n=r[1].map(function(t,e){return void 0!==r[0][e]&&r[0][e]!==t&&a.push(o._renderPairButton()),o._renderUnpairedDataset(t)}),i=r[0].map(function(t){return o._renderUnpairedDataset(t)}),i.length||n.length?(this.$(".unpaired-columns .forward-column .column-datasets").append(i).add(this.$(".unpaired-columns .paired-column .column-datasets").append(a)).add(this.$(".unpaired-columns .reverse-column .column-datasets").append(n)),void this._adjUnpairedOnScrollbar()):void this._renderUnpairedNotShown())},_renderUnpairedDisplayStr:function(t){return["(",t," ",s("filtered out"),")"].join("")},_renderUnpairedDataset:function(t){return l(" ").attr("id","dataset-"+t.id).addClass("dataset unpaired").attr("draggable",!0).addClass(t.selected?"selected":"").append(l(" ").addClass("dataset-name").text(t.name)).data("dataset",t)},_renderPairButton:function(){return l(" ").addClass("dataset unpaired").append(l(" ").addClass("dataset-name").text(s("Pair these datasets")))},_renderUnpairedEmpty:function(){var t=l('
').text("("+s("no remaining unpaired datasets")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(t),t},_renderUnpairedNotShown:function(){var t=l('
').text("("+s("no datasets were found matching the current filters")+")");return this.$(".unpaired-columns .paired-column .column-datasets").empty().prepend(t),t},_adjUnpairedOnScrollbar:function(){var t=this.$(".unpaired-columns").last(),e=this.$(".unpaired-columns .reverse-column .dataset").first();if(e.length){var i=t.offset().left+t.outerWidth(),n=e.offset().left+e.outerWidth(),s=Math.floor(i)-Math.floor(n);this.$(".unpaired-columns .forward-column").css("margin-left",s>0?s:0)}},_renderPaired:function(t,e){if(this.$(".paired-column-title .title").text([this.paired.length,s("paired")].join(" ")),this.$(".unpair-all-link").toggle(0!==this.paired.length),0===this.paired.length)return void this._renderPairedEmpty();this.$(".remove-extensions-link").show(),this.$(".paired-columns .column-datasets").empty();var i=this;this.paired.forEach(function(t,e){var n=new u({pair:t});i.$(".paired-columns .column-datasets").append(n.render().$el).append(['',' '," "].join(""))})},_renderPairedEmpty:function(){var t=l('
').text("("+s("no paired datasets yet")+")");return this.$(".paired-columns .column-datasets").empty().prepend(t),t},_renderFooter:function(t,e){var i=this.$(".footer").empty().html(p.templates.footer());return this.$(".remove-extensions").prop("checked",this.removeExtensions),"function"==typeof this.oncancel&&this.$(".cancel-create.btn").show(),i},_addPluginComponents:function(){this._chooseFiltersPopover(".choose-filters-link"),this.$(".help-content i").hoverhighlight(".collection-creator","rgba( 64, 255, 255, 1.0 )")},_chooseFiltersPopover:function(t){function e(t,e){return['',s("Forward"),": ",t,", ",s("Reverse"),": ",e," "].join("")}var i=l(a.template(['','
',s("Choose from the following filters to change which unpaired reads are shown in the display"),":
",a.values(this.commonFilters).map(function(t){return e(t[0],t[1])}).join(""),"
"].join(""))({}));return this.$(t).popover({container:".collection-creator",placement:"bottom",html:!0,content:i})},_validationWarning:function(t,e){var i="validation-warning";"name"===t&&(t=this.$(".collection-name").add(this.$(".collection-name-prompt")),this.$(".collection-name").focus().select()),e?(t=t||this.$("."+i),t.removeClass(i)):t.addClass(i)},_setUpBehaviors:function(){return this.once("rendered",function(){this.trigger("rendered:initial",this)}),this.on("pair:new",function(){this._renderUnpaired(),this._renderPaired(),this.$(".paired-columns").scrollTop(8e6)}),this.on("pair:unpair",function(t){this._renderUnpaired(),this._renderPaired(),this.splitView()}),this.on("filter-change",function(){this.filters=[this.$(".forward-unpaired-filter input").val(),this.$(".reverse-unpaired-filter input").val()],this.metric("filter-change",this.filters),this._renderFilters(),this._renderUnpaired()}),this.on("autopair",function(){this._renderUnpaired(),this._renderPaired();var t,e=null;this.paired.length?(e="alert-success",t=this.paired.length+" "+s("pairs created"),this.unpaired.length||(t+=": "+s("all datasets have been successfully paired"),this.hideUnpaired(),this.$(".collection-name").focus())):t=s(["Could not automatically create any pairs from the given dataset names.","You may want to choose or enter different filters and try auto-pairing again.","Close this message using the X on the right to view more help."].join(" ")),this._showAlert(t,e)}),this},events:{"click .more-help":"_clickMoreHelp","click .less-help":"_clickLessHelp","click .header .alert button":"_hideAlert","click .forward-column .column-title":"_clickShowOnlyUnpaired","click .reverse-column .column-title":"_clickShowOnlyUnpaired","click .unpair-all-link":"_clickUnpairAll","change .forward-unpaired-filter input":function(t){this.trigger("filter-change")},"focus .forward-unpaired-filter input":function(t){l(t.currentTarget).select()},"click .autopair-link":"_clickAutopair","click .choose-filters .filter-choice":"_clickFilterChoice","click .clear-filters-link":"_clearFilters","change .reverse-unpaired-filter input":function(t){this.trigger("filter-change")},"focus .reverse-unpaired-filter input":function(t){l(t.currentTarget).select()},"click .forward-column .dataset.unpaired":"_clickUnpairedDataset","click .reverse-column .dataset.unpaired":"_clickUnpairedDataset","click .paired-column .dataset.unpaired":"_clickPairRow","click .unpaired-columns":"clearSelectedUnpaired","mousedown .unpaired-columns .dataset":"_mousedownUnpaired","click .paired-column-title":"_clickShowOnlyPaired","mousedown .flexible-partition-drag":"_startPartitionDrag","click .paired-columns .dataset.paired":"selectPair","click .paired-columns":"clearSelectedPaired","click .paired-columns .pair-name":"_clickPairName","click .unpair-btn":"_clickUnpair","dragover .paired-columns .column-datasets":"_dragoverPairedColumns","drop .paired-columns .column-datasets":"_dropPairedColumns","pair.dragstart .paired-columns .column-datasets":"_pairDragstart","pair.dragend .paired-columns .column-datasets":"_pairDragend","change .remove-extensions":function(t){this.toggleExtensions()},"change .collection-name":"_changeName","keydown .collection-name":"_nameCheckForEnter","click .cancel-create":function(t){"function"==typeof this.oncancel&&this.oncancel.call(this)},"click .create-collection":"_clickCreate"},_clickMoreHelp:function(t){this.$(".main-help").addClass("expanded"),this.$(".more-help").hide()},_clickLessHelp:function(t){this.$(".main-help").removeClass("expanded"),this.$(".more-help").show()},_showAlert:function(t,e){e=e||"alert-danger",this.$(".main-help").hide(),this.$(".header .alert").attr("class","alert alert-dismissable").addClass(e).show().find(".alert-message").html(t)},_hideAlert:function(t){this.$(".main-help").show(),this.$(".header .alert").hide()},_clickShowOnlyUnpaired:function(t){this.$(".paired-columns").is(":visible")?this.hidePaired():this.splitView()},_clickShowOnlyPaired:function(t){this.$(".unpaired-columns").is(":visible")?this.hideUnpaired():this.splitView()},hideUnpaired:function(t,e){this.unpairedPanelHidden=!0,this.pairedPanelHidden=!1,this._renderMiddle(t,e)},hidePaired:function(t,e){this.unpairedPanelHidden=!1,this.pairedPanelHidden=!0,this._renderMiddle(t,e)},splitView:function(t,e){return this.unpairedPanelHidden=this.pairedPanelHidden=!1,this._renderMiddle(t,e),this},_clickUnpairAll:function(t){this.metric("unpairAll"),this.unpairAll()},_clickAutopair:function(t){var e=this.autoPair();this.metric("autopair",e.length,this.unpaired.length),this.trigger("autopair")},_clickFilterChoice:function(t){var e=l(t.currentTarget);this.$(".forward-unpaired-filter input").val(e.data("forward")),this.$(".reverse-unpaired-filter input").val(e.data("reverse")),this._hideChooseFilters(),this.trigger("filter-change")},_hideChooseFilters:function(){this.$(".choose-filters-link").popover("hide"),this.$(".popover").css("display","none")},_clearFilters:function(t){this.$(".forward-unpaired-filter input").val(""),this.$(".reverse-unpaired-filter input").val(""),this.trigger("filter-change")},_clickUnpairedDataset:function(t){return t.stopPropagation(),this.toggleSelectUnpaired(l(t.currentTarget))},toggleSelectUnpaired:function(t,e){e=e||{};var i=t.data("dataset"),n=void 0!==e.force?e.force:!t.hasClass("selected");return t.length&&void 0!==i?(n?(t.addClass("selected"),e.waitToPair||this.pairAllSelected()):t.removeClass("selected"),t):t},pairAllSelected:function(t){t=t||{};var e=this,i=[],n=[],s=[];return e.$(".unpaired-columns .forward-column .dataset.selected").each(function(){i.push(l(this).data("dataset"))}),e.$(".unpaired-columns .reverse-column .dataset.selected").each(function(){n.push(l(this).data("dataset"))}),i.length=n.length=Math.min(i.length,n.length),i.forEach(function(t,i){try{s.push(e._pair(t,n[i],{silent:!0}))}catch(o){e.error(o)}}),s.length&&!t.silent&&this.trigger("pair:new",s),s},clearSelectedUnpaired:function(){this.$(".unpaired-columns .dataset.selected").removeClass("selected")},_mousedownUnpaired:function(t){if(t.shiftKey){var e=this,i=l(t.target).addClass("selected"),n=function(t){e.$(t.target).filter(".dataset").addClass("selected")};i.parent().on("mousemove",n),l(document).one("mouseup",function(t){i.parent().off("mousemove",n),e.pairAllSelected()})}},_clickPairRow:function(t){var e=l(t.currentTarget).index(),i=l(".unpaired-columns .forward-column .dataset").eq(e).data("dataset"),n=l(".unpaired-columns .reverse-column .dataset").eq(e).data("dataset");this._pair(i,n)},_startPartitionDrag:function(t){function e(t){n.$(".flexible-partition-drag").css("color",""),l("body").css("cursor","").unbind("mousemove",i)}function i(t){var e=t.pageY-s;n.adjPartition(e)||l("body").trigger("mouseup"),n._adjUnpairedOnScrollbar(),s+=e}var n=this,s=t.pageY;l("body").css("cursor","ns-resize"),n.$(".flexible-partition-drag").css("color","black"),l("body").mousemove(i),l("body").one("mouseup",e)},adjPartition:function(t){var e=this.$(".unpaired-columns"),i=this.$(".paired-columns"),n=parseInt(e.css("height"),10),s=parseInt(i.css("height"),10);n=Math.max(10,n+t),s-=t;var o=0>t;if(o){if(this.unpairedPanelHidden)return!1;if(10>=n)return this.hideUnpaired(),!1}else this.unpairedPanelHidden&&(e.show(),this.unpairedPanelHidden=!1);if(o)this.pairedPanelHidden&&(i.show(),this.pairedPanelHidden=!1);else{if(this.pairedPanelHidden)return!1;if(15>=s)return this.hidePaired(),!1}return e.css({height:n+"px",flex:"0 0 auto"}),!0},selectPair:function(t){t.stopPropagation(),l(t.currentTarget).toggleClass("selected")},clearSelectedPaired:function(t){this.$(".paired-columns .dataset.selected").removeClass("selected")},_clickPairName:function(t){t.stopPropagation();var e=l(t.currentTarget),i=e.parent().parent(),n=i.index(".dataset.paired"),s=this.paired[n],o=prompt("Enter a new name for the pair:",s.name);o&&(s.name=o,s.customizedName=!0,e.text(s.name))},_clickUnpair:function(t){var e=Math.floor(l(t.currentTarget).index(".unpair-btn"));this._unpair(this.paired[e])},_dragoverPairedColumns:function(t){t.preventDefault();var e=this.$(".paired-columns .column-datasets");this._checkForAutoscroll(e,t.originalEvent.clientY);var i=this._getNearestPairedDatasetLi(t.originalEvent.clientY);l(".element-drop-placeholder").remove();var n=l('
');i.length?i.before(n):e.append(n)},_checkForAutoscroll:function(t,e){var i=2,n=t.offset(),s=t.scrollTop(),o=e-n.top,a=n.top+t.outerHeight()-e;o>=0&&o=0&&at&&t>o-a)return s}return l()},_dropPairedColumns:function(t){t.preventDefault(),t.dataTransfer.dropEffect="move";var e=this._getNearestPairedDatasetLi(t.originalEvent.clientY);return e.length?this.$dragging.insertBefore(e):this.$dragging.insertAfter(this.$(".paired-columns .unpair-btn").last()),this._syncPairsToDom(),!1},_syncPairsToDom:function(){var t=[];this.$(".paired-columns .dataset.paired").each(function(){t.push(l(this).data("pair"))}),this.paired=t,this._renderPaired()},_pairDragstart:function(t,e){e.$el.addClass("selected");var i=this.$(".paired-columns .dataset.selected");this.$dragging=i},_pairDragend:function(t,e){l(".element-drop-placeholder").remove(),this.$dragging=null},toggleExtensions:function(t){var e=this;e.removeExtensions=void 0!==t?t:!e.removeExtensions,a.each(e.paired,function(t){t.customizedName||(t.name=e._guessNameForPair(t.forward,t.reverse))}),e._renderPaired(),e._renderFooter()},_changeName:function(t){this._validationWarning("name",!!this._getName())},_nameCheckForEnter:function(t){13!==t.keyCode||this.blocking||this._clickCreate()},_getName:function(){return a.escape(this.$(".collection-name").val())},_clickCreate:function(t){var e=this._getName();e?this.blocking||this.createList():this._validationWarning("name")},_printList:function(t){var e=this;a.each(t,function(i){t===e.paired&&e._printPair(i)})},_printPair:function(t){this.debug(t.forward.name,t.reverse.name,": ->",t.name)},toString:function(){return"PairedCollectionCreator"}});p.templates=p.templates||{main:a.template(['','
','